This is a migrated thread and some comments may be shown as answers.

Bullet Styles

1 Answer 60 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Scott Michetti asked on 11 Feb 2014, 04:52 PM
Hello,
I'm using the Telerik Web Editor, downloading the HTML and loading it into the RichTextBox. What do I need to do to make the RichTextBox look like the web editor?
Specifically, the bulleted lists do not match. At times, users will paste lists from Word into the web editor, and it looks great. If I get the HTML from the editor and reload it back into the editor, it looks the same, but if I load the HTML into the RichTextBox on the desktop, the bulleted list is not right. Here's my WPF code. Loading the following HTML into the web editor looks good, but loading into the RichTextBox on the desktop does not look right.

Thanks,
Scott

HtmlFormatProvider provider = new HtmlFormatProvider();           
string s = "<span style=\"font-family: Calibri;\">\r\n<ul style=\"list-style-type: square;\">\r\n    <li><span style=\"font-family: Wingdings;\">&micro;</span><span style=\"font-family: Calibri;\">You</span>\r\n    <ul style=\"list-style-type: circle;\">\r\n        <li><span style=\"font-family: Calibri;\">Are</span>\r\n        <ul style=\"list-style-type: square;\">\r\n            <li><span style=\"font-family: Calibri;\">Here</span>\r\n            <ul style=\"list-style-type: square;\">\r\n                <li><span style=\"font-family: Calibri;\">Yes</span></li>\r\n            </ul>\r\n            </li>\r\n        </ul>\r\n        </li>\r\n    </ul>\r\n    </li>\r\n</ul>\r\n</span>";
radRichTextBox.Document = provider.Import(s);

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 12 Feb 2014, 02:00 PM
Hello Scott,

 Thank you for contacting us about this issue.

We can confirm that the problem exists and it is related to the "list-style-type" attribute. The value of this attribute is "square" and currently we do not support this value.  Nevertheless we can call this a bug as the list is not imported as list. I will log this issue to our to do list for further investigation and fix.

Meanwhile as workaround you can change the value of the "list-style-type" attribute to one of the supported types. Which are:
  • disc.
  • decimal.
  • lower-latin.
  • upper-latin.
  • lower-roman.
  • upper-roman.

In appreciation for your involvement I have updated your Telerik points.

If you have further questions or comments feel free to contact us again.

Regards,
Mihail
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
RichTextBox
Asked by
Scott Michetti
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or