Trying to simply load HTML String into RadRichTextBox???

2 posts, 0 answers
  1. Cedric Gaines
    Cedric Gaines avatar
    9 posts
    Member since:
    Dec 2004

    Posted 20 Sep 2012 Link to this post

    OK,

    What I thought would be simple is beginning to trouble me.  I've read the documentation and what I gather is that you load / import the HTML formatted text into a RadDocument and then set the RadRichTextBox Document property to equal that of the RadDocument you created.

    Here is my simple code.
    (This code works, but what I see is not the formatted text FROM the HTML string, but I'm just seeing the HTML string itself)... (Please Help)

    //HTML Import
     
    HtmlFormatProvider msgHTML = new HtmlFormatProvider();
    RadDocument tempDoc = msgHTML.Import(this.scMsg.messageText.ToString());
    this.msgContent.Document = tempDoc; // msgContent is the instance of RadRichTextBox

    As I said, this compiles but instead of me seeing the formatted view, all that comes up is the Actual HTML code.

    Thanks and I hope someone can help,

    Cedric
  2. Svett
    Admin
    Svett avatar
    728 posts

    Posted 24 Sep 2012 Link to this post

    Hi Cedric,

    I am not able to assist you efficiently by following the supplied code snippet. Could you send us the html text that you are trying to import? This will help us get a clear picture of your case.

    Regards,
    Svett
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top