NullReferenceException is thrown when the "var" CSS function is used in the HTML on HtmlFormatProvider Import method call.
The exception occurs only for CSS properties processed by RadRichTextBox. For example: "vertical-align", "font-family", "font-weight", "text-decoration-underline", etc.
The following HTML produces such error:
<span style="vertical-align: var(--my-variable);">
</span>
If the span tag doesn't have any content, the error doesn't occur.
The exception stacktrace is:
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.FillSpanProperties(SpanProperties spanProps, EvaluateProperty evalFunction, IEnumerable`1 disregarderdDefaultStyleBagPropertiesCollection)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.CreateSpanFromTextNode(INode childNode, Paragraph paragraph, IEnumerable`1 disregarderdDefaultStyleBagPropertiesCollection)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessContentNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.<>c__DisplayClass80_0.<ProcessNode>b__0()
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.<>c__DisplayClass80_0.<ProcessNode>b__0()
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.<>c__DisplayClass80_0.<ProcessNode>b__0()
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.<>c__DisplayClass80_0.<ProcessNode>b__0()
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessHyperlinkNode(INode node, Action innerAction)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessAnnotationsForNode(INode node, Action innerAction)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessGenericNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.<>c__DisplayClass80_0.<ProcessNode>b__0()
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.ProcessNode(INode node)
at Telerik.Windows.Documents.FormatProviders.Html.Import.HtmlDocumentImporter.Import(Stream input)
To work this around, avoid using the "var" function in the CSS.
The border of the ContentControl is displayed abnormally when the paragraph's TextAlignment is set to Center or Right.
Appling the following command changing the margin but doesn't change the position of the DocumentRuler:
this.radRichTextBox.ActiveDocumentEditor.ChangeSectionPageMargin(new Padding((int)Unit.InchToDip(3.0)));
The result:
MethodInfo method = typeof(RadRichTextBoxRulerController).GetMethod("OnSeparatorsChanged", BindingFlags.NonPublic | BindingFlags.Instance);
method.Invoke(this.ruler.Controller, null);
<telerik:DocumentRuler x:Name="ruler">
Introduce an option to change the character which follows the list level symbol. By default this is a Tab character, however, they can be the following: - Tab - Space - Nothing (none following character) In OOXML, this is described using the 'suff' element. In MS Word, this setting could be changed by selecting the bullet/number of the list item -> Context Menu -> Adjust List Indents -> Follow number with:.
<!DOCTYPE html>
<html>
<body>
<div><p>RadDocument</p></div>
<div>Document</div>
</body>
</html>
For now, We can drag or paste Images into RadRichTextBox. But still can't drag or paste files like RichTextBox in Winform. It's very inconvenient!