The custom list styles from a document exported by RadRichTextBox's HtmlFormatProvider are not imported.
When trying to show the RadRichTextBox' LineNumberingDialog, nothing is displayed. This happens when using the NoXaml Telerik dlls and themes other than Windows11. The dialog is shown only in the Windows11 theme.
To work this around, add the following two lines in the App.xaml resources.
<Application x:Class="WpfApp1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp1"
xmlns:telerikDialogs="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.Dialogs;assembly=Telerik.Windows.Controls.RichTextBox"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.RichTextBox.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="telerikDialogs:LineNumberingDialog" BasedOn="{StaticResource RadWindowStyle}"/>
<Style TargetType="telerikDialogs:LineNumberingDistanceNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}"/>
</ResourceDictionary>
</Application.Resources>
</Application>
The image adorner in is not shown in NetCore/6/7/8 when ApplicationTheme is not set (XAML only).
Workaround:
Explicitly set the theme:
StyleManager.ApplicationTheme = new Office2016Theme();
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.
HtmlFormatProvider: Exception when importing a table that has only width set. In this case, we are trying to measure some elements with float.NaN.
Workaround: Use the HtmlFormatProvider from the Document Processing library.