Bulleted and Numbered lists HTML format issues in RichTextBoxAdv

Hi,

I am trying to save the content of the RichTextBoxAdv in HTML format and be able to load it in the same RichTextBoxAdv later. The problem is that when I have some lists in the richTextBox and save them as HTML, they are saved as span and not as li in a ul or ol. . This means that after loading them back in the editor, they will be treated as paragraphs and not as lists, so if I try to modify the number format or the bullet format, it will just add another bullet next to the existing one. Is there any way to make the lists be saved as li in ul or ol in HTML export option?


Here is the code I used for saving the richtextboxadv content in HTML format: 

saveHtml.PNG

Here is the formatted text saved in this.HtmlText: 

htmlBody.PNG

Here is the list that translates to the formatted text:

List.PNG


1 Reply

KG Kalaivannan Ganesan Syncfusion Team November 24, 2021 04:48 PM UTC

Hi Andrei,

Thanks for contacting Syncfusion support.

The 
SfRichTextBoxAdv control is a word document-based editor that provides HTML file import and export functionality as a secondary feature. It doesn’t use native browser control for importing (displaying) and exporting HTML text. Instead, it has won HTML file reader and writer written from scratch to perform HTML import and export from the SfRichTextBoxAdv control document object model (DOM).

So, the list contents are maintained as Span and Paragraphs and not as Li tags in exported HTML. But there is no preservation difference on opening the exported HTML document in our control, MS word, and browsers.

You can confirm this behavior of exporting the list as HTML in the Microsoft word. Since our control works like MS word.

Please let us know if you have any other questions.

Regards,
Kalaivannan Ganesan
 


Loader.
Up arrow icon