Hello,
I am trying to get the RichTextBox to work with some of our existing HTML email context that we keep in our db. While I can get very simple messages to load via the HTMLFormatProvider, I have noticed one glaring item.
When I try to load am html document that uses a '<font>' tag, any text inside the tag is not loaded/shown in the RichTextBox. Its seems that similar tags like 'span' do work, but not 'font'. Is this a known issue or is it supposed to behave like this? Is there a complete list/example of what HTML tags will/will not work?
In the example below... 'Test Heading' will show, but 'Test paragraph' will not (unless I remove the '<font>' tags). I've also tried it with font tags that have actual attributes and those too don't work (face, color, size, etc.).
Thanks.
I am trying to get the RichTextBox to work with some of our existing HTML email context that we keep in our db. While I can get very simple messages to load via the HTMLFormatProvider, I have noticed one glaring item.
When I try to load am html document that uses a '<font>' tag, any text inside the tag is not loaded/shown in the RichTextBox. Its seems that similar tags like 'span' do work, but not 'font'. Is this a known issue or is it supposed to behave like this? Is there a complete list/example of what HTML tags will/will not work?
In the example below... 'Test Heading' will show, but 'Test paragraph' will not (unless I remove the '<font>' tags). I've also tried it with font tags that have actual attributes and those too don't work (face, color, size, etc.).
Thanks.
private RadDocument CreateRadDocument(string content)
{
HtmlFormatProvider provider = new HtmlFormatProvider();
content = @"<
html
><
body
><
h1
>Test Heading</
h1
><
p
><
font
>Test paragraph.</
font
></
p
></
body
></
html
>";
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;
}