To reproduce:
- add a RadRichTextBox and use the following code
RadDocument document = null;
HtmlFormatProvider provider = new HtmlFormatProvider ();
OpenFileDialog openDialog = new OpenFileDialog();
openDialog.Filter = "Documents|*.html";
openDialog.Multiselect = false;
DialogResult dialogResult = openDialog.ShowDialog();
if (dialogResult == System.Windows.Forms.DialogResult.OK)
{
using (FileStream stream = new FileStream(openDialog.FileName, FileMode.Open))
{
document = provider.Import(stream);
}
}
this.radRichTextBox1.Document = document;
Note: in the html file use the following way of commenting the style tag:
<style>
<!--
some style content
-->
</style>
Workaround: use the following way of commenting the content:
<!--<style>
some style content
</style>-->
Resolution:
This issue is addressed in the new version of the control - RadRichTextEditor. Please use the new control instead the RadRichTextBox.