Here we are:
HtmlFormatProvider htmlProvider = new HtmlFormatProvider();
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
string _html =
@"
<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">
</head>
<body>
<div name=""divtagdefaultwrapper"" style=""font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0"">
<div class=""WordSection1"">
<p class=""MsoNormal"" style=""text-autospace:none"">
<span style=""font-size:11pt; color:rgb(31,73,125)"">
I am out of office, please contact Aaaaaa Bbbbbbb (Tel: +1-234-567-8900/email:
<a href=""mailto:aaaaaa.bbbbbb@zzz.com"">aaaaaa.bbbbbb@zzz.com</a>) for assistance
</span>
</p>
</div>
</div>
</body>
</html>
";
RadDocument _doc = htmlProvider.Import(_html);
radRichTextBox.Document = _doc;
And here is an exception:
System.NullReferenceException
The DeepCopy method does not copy the font of the predefined table styles
Workaround:
var fragment = new DocumentFragment(radRichTextBox.Document);
radRichTextBox.Document = new RadDocument();
DefaultStyleSheet.Instance.ApplyStylesheetToDocument(radRichTextBox.Document);
radRichTextBox.InsertFragment(fragment);
Implement import and export of OpenDocument files (.odt).
htmlString = htmlString.Replace("<p>", string.Empty).Replace("</p>", string.Empty);
In a specific scenario when there are many tables in a document the following case leads to NullReferenceException.
- Select few tables
- while mouse is still selecting tables use keyboard's Ctrl + A
- Leave the mouse
- use Ctrl + A again (this time everything is selected)
- hit Delete
- Object reference not set to an instance of an object is thrown
Hello,
We found a problem when using the radrichtextbox control. When radrichtextbox is enabled to cancel input, error will be reported using the sougou Chinese input method. This problem will not occur in the English input method. Please help solve it. Thank you very much.
This functionality is supported by MS Word:
A possible workaround could be to enclose the RadSpreadsheet as a UI element. More information could be found in the InlineUIContainer help article.