Extra spaces/gaps around <p>, <ul>, <ol>, <li> tags when rendering html text.

1 Answer 57 Views
HTMLTextBox Report Designer (standalone) Styling
Elena
Top achievements
Rank 1
Elena asked on 02 Sep 2022, 12:05 PM | edited on 02 Sep 2022, 12:13 PM

Good day!

Could you please help me to find the solution?

I have several htmlboxex in the report which accept html-strings from text-editor(for ex. <p>Comment</p><p>Comment</p><ol><li>List</li><li>List</li><li>List</li></ol><p><br></p><p>Comment</p><p>Comment</p>). And when I open the preview mode or look at it in html-viewer I get annoying extra gaps (see attached support.png). I tried to replace these <p>-tags with <div>-tags in the retrieved string in my sql-query (<div>Comment</div><div>Comment</div><ol><li>List</li><li>List</li><li>List</li></ol><div><br></div><div>Comment</div><div>Comment</div>). It helps. But there are some other tags that cannot be replaced (tags of ordered and unordered lists for example). And these gaps are still rendered. Could you please help me to find the solution how to make this text to be rendered correctly (see attached original.png, result.png)?

Thanks

Best regards, Helen

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 07 Sep 2022, 08:33 AM

Hi Helen,

Thank you for the runnable report. I confirm the described issues. Indeed, there is additional whitespace between the <p> tags and before and after the list tags.

I have logged this as a new bug report in our public feedback portal and voted on your behalf - HtmlTextBox generates extra space around the paragraph and list tags. As a token of gratitude, we have updated your Telerik points.

The workaround you may use until we fix the issue is described in the KB article How to render any HTML tags and CSS attributes in reports.

Regards,


Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Elena
Top achievements
Rank 1
commented on 07 Sep 2022, 09:13 AM

Hi, Todor!

Thanks for the answer!

Regards, Helen

Tags
HTMLTextBox Report Designer (standalone) Styling
Asked by
Elena
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or