RTF <-> HTML for editor loses bullet list

2 posts, 0 answers
  1. swegele
    swegele avatar
    20 posts
    Member since:
    Apr 2007

    Posted 17 Feb 2016 Link to this post

    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


  2. Ianko
    Ianko avatar
    1729 posts

    Posted 22 Feb 2016 Link to this post

    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. 

    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
Back to Top