Hi all,
I've a problem with HTMLFormatProvider and font-style.
I'm using a radRichTextBox with richRibbonBar (but the problem is also present with a button that execute radRichTextBox1.toggleItalic() ). For example, I have write the string "foofoofoo" in italic inside radRichTextBox and then, using HTMLFormatProvider, I've got the text associated to the document.
This is the ExportToHTML function
public string ExportToHTML(RadDocument document)
{
HtmlFormatProvider provider = new HtmlFormatProvider();
return provider.Export(document);
}
This is the string returned:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
.p_4451D050 { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_C54C634B { font-family: 'Calibri';font-style: System.Collections.Specialized.StringCollection;font-size: 16px;color: #000000; }
</style></head><body><p class="p_4451D050"><span class="s_C54C634B">foofoofoo</span></p></body></html>
There is a problem in font-style settings of css class, because it doesn't write "italic" but "System.Collections....".
So, when I send a html-email in this format I lost this font setting..
I've tried with XamlFormatProvider and italic (as fontweight) is correct.
Thanks a lot for your help
I've a problem with HTMLFormatProvider and font-style.
I'm using a radRichTextBox with richRibbonBar (but the problem is also present with a button that execute radRichTextBox1.toggleItalic() ). For example, I have write the string "foofoofoo" in italic inside radRichTextBox and then, using HTMLFormatProvider, I've got the text associated to the document.
This is the ExportToHTML function
public string ExportToHTML(RadDocument document)
{
HtmlFormatProvider provider = new HtmlFormatProvider();
return provider.Export(document);
}
This is the string returned:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
.p_4451D050 { margin: 0px 0px 12px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_C54C634B { font-family: 'Calibri';font-style: System.Collections.Specialized.StringCollection;font-size: 16px;color: #000000; }
</style></head><body><p class="p_4451D050"><span class="s_C54C634B">foofoofoo</span></p></body></html>
There is a problem in font-style settings of css class, because it doesn't write "italic" but "System.Collections....".
So, when I send a html-email in this format I lost this font setting..
I've tried with XamlFormatProvider and italic (as fontweight) is correct.
Thanks a lot for your help