When adding a new document to the same instance of a RichTextEditor, the UIProviderRegistry instance of the RichTextBox will keep a dictionary entry for a SectionLayoutBox that contains a reference to a non cleaned up WaterMarkUiProvider.
This SectionLayoutBox in turn has a reference to a DocumentLayoutBox (parent) which has a reference to an old document instance.
A new dictionary entry is added and (retained) for every document loaded.
Disposing the old document makes no difference.
The built-in Hyperlink style is not applied to hyperlinks imported from HTML (<a> tag). As a result, the hyperlinks in the document does not have the blue underline.
- Import the following HTML: <a href="http://google.com">test</a>RadRichTextEditor: The paste options popup stays visible when the control is hidden
Workaround:
((MiniToolBarBase)this.radRichTextEditor1.RichTextBoxElement.PasteOptionsPopup).Hide();
Importing this:
<p>This is a paragraph.</p>
<p>
This is a paragraph.
</p>
should import two identical paragraphs, but it actually import it like this:
This is a paragraph. This is a paragraph.
It has a leading space before the second paragraph.
The default browser paragraph spacing is not preserved during HTML import-export.
Workaround:
StyleDefinition normalStyle = this.radRichTextEditor1.Document.StyleRepository[RadDocumentDefaultStyles.NormalWebStyleName];
normalStyle.ParagraphProperties.SpacingAfter = 20;
normalStyle.ParagraphProperties.SpacingBefore = 20;
The ChangeFontStyle method does not work when setting Underline:
radRichTextEditor1.ChangeFontStyle( FontStyle.Underline);
Workaround:
radRichTextEditor1.ToggleUnderline();
When changing the theme through ThemeResolutionService.ApplicationThemeName all the application gets changed. Except the ForeColor of the RadRichTextEditor does not get change. Hence the box displays black text on a dark background. Quite unreadable.
Assigning the theme directly in the designer makes everything renders ok.
Sample application attached.
Regrads,
Matthias
When a document is imported from HTML, we set locally to the span elements Times New Roman nevertheless it is not declared anywhere. This breaks the document view if for example we decide to change the RadDocument's default font family or even the NormalWeb style's font. The same applies for the font size as well.
Workaround: Clear the FontFamily property after import
foreach (Span span in this.radRichTextBox.Document.EnumerateChildrenOfType<Span>())
{
span.GetStyleProperty(Span.FontFamilyProperty).ClearValue();
span.GetStyleProperty(Span.FontSizeProperty).ClearValue();
}
Steps to reproduce:
1. Import the following html:
this.radRichTextBox.Document = new HtmlFormatProvider().Import(@"<h1>Hello</h1><h2>World</h2><p>Lorem ipsum<p>");
2. Set the document's default font family to Comic Sans MS:
this.radRichTextBox.Document.Style.SpanProperties.FontFamily = new FontFamily("Comic Sans MS");
Observe: The font in the document is Times New Roman
Expected: The font should be Comic Sans MS
Add Korean language to your machine:
Then type 'rkskekfk'. The expected symbols are: "가나다라". However, if you try selecting the entered text, the last symbol disappears: