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

RTF <-> HTML for editor loses bullet list

1 Answer 178 Views
Editor
This is a migrated thread and some comments may be shown as answers.
swegele
Top achievements
Rank 1
swegele asked on 18 Feb 2016, 03:38 AM

I have the following rich text string set in a microsoft rich text box in a winforms app ... simple bulleted list of 2 lines.

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Verdana;}{\f2\fnil\fcharset2 Symbol;}}
\viewkind4\uc1\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\sl240\slmult1\f0\fs18 bullet item 1\f1\fs20
\par \f0\fs18{\pntext\f2\'B7\tab}bullet item 2\f1\fs20
\par }

 

I run that through this formatting process:

//convert from RTF to HTML
RtfFormatProvider rtfProvider = new RtfFormatProvider();
HtmlFormatProvider htmlProvider = new HtmlFormatProvider();
RadFlowDocument document = rtfProvider.Import(richText);
RadEditorRichTextLabNote.Content = htmlProvider.Export(document);

I end up with the two lines of text but the bulleted part is gone.

Going from HTML back to RTF also loses the bulleted list.

See the screenshots below of how the winforms application shows the rich text vs the asp.net radeditor.

Please advise.  Thanks

Sean

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 22 Feb 2016, 03:20 PM
Hello Sean,

I suspect the WinForms RichTextBox control used is an old one. The generated string has the \pntext as marker for an bullet item. This marker is obsolete and currently not supported. Therefore, this behavior is expected when using more recent version of RadWordsProcessing library. You can see that change in our release notes (http://www.telerik.com/support/whats-new/wpf/release-history/q1-2014): RtfFormatProvider: Bullets in a document are visualized with extra symbols.

I suggest you to upgrade the Telerik UI for WinForms suite and test again. 

Regards,
Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
swegele
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or