This question is locked. New answers and comments are not allowed.
Hello,
I'm using a RadRichTextBox to import a RadDocument and HTML text using the code below:-
The text (with bold formatting) shows up correctly in the RadRichTextBox. I then Export the text to HTML using the code below:-
I take the HTML export output and save it as a .html file. When I open this file in IE, the Bold formatting is lost. Likewise, any Italic (or for that matter, any formatting is lost if viewed in Internet Explorer).
Please advice if I'm making any mistake or provide resolution.
Thanks.
I'm using a RadRichTextBox to import a RadDocument and HTML text using the code below:-
string content = @"<P>We <B>operate</B> as a vehicle to enable clients to access managed accounts.</P>";
IDocumentFormatProvider provider = new HtmlFormatProvider();
RadDocument document;
using (MemoryStream stream = new MemoryStream())
{
StreamWriter writer = new StreamWriter(stream);
writer.Write(content);
writer.Flush();
stream.Seek(0,
SeekOrigin.Begin);
document = provider.Import(stream);
}
return document;
The text (with bold formatting) shows up correctly in the RadRichTextBox. I then Export the text to HTML using the code below:-
IDocumentFormatProvider exporter = new HtmlFormatProvider();
var output = new MemoryStream();
exporter.Export(editor.Document, output);
output.Seek(0,
SeekOrigin.Begin);
var reader = new StreamReader(output);
return reader.ReadToEnd();
I take the HTML export output and save it as a .html file. When I open this file in IE, the Bold formatting is lost. Likewise, any Italic (or for that matter, any formatting is lost if viewed in Internet Explorer).
Please advice if I'm making any mistake or provide resolution.
Thanks.