I am using WPF RichTextBox. From that, I am reading the content in RTF format using the following code.
TextRange textRange = new TextRange(paramRichTextBox.Document.ContentStart, paramRichTextBox.Document.ContentEnd);
MemoryStream msData = new MemoryStream();
//get the data from the selected range
//strData = textRange.Text;
strData = ASCIIEncoding.Default.GetString(msData.ToArray());
I also found that there is an option called DataFormats.HTML. Hence, I tried using this but ended up with error. Is there any other way to read the content of RichTextBox in HTML format?
Thanks in Advance!!!
View Complete Post