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

Trying to simply load HTML String into RadRichTextBox???

1 Answer 290 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Cedric Gaines
Top achievements
Rank 2
Cedric Gaines asked on 20 Sep 2012, 07:34 PM
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

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 24 Sep 2012, 02:41 PM
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 >>
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Cedric Gaines
Top achievements
Rank 2
Answers by
Svett
Telerik team
Share this question
or