Consider introducing a property in the XAML that allows the user to set whether the gallery should be loaded asynchronously or not in order to handle scenarios in which the TableStylesGallery is not in a contextual tab.
This element specifies a set of table properties which shall be applied to the contents of this row in place of the table properties specified in the tblPr element.
The built-in Hyperlink style is not applied to hyperlinks imported from HTML (<a> tag). As a result, the hyperlinks in the document do not have the blue underline. Workaround: Subscribe for the SetupDocument event of the HtmlDataProvider and set the hyperlinks' style manually. private void HtmlDataProvider_SetupDocument(object sender, Telerik.Windows.Documents.FormatProviders.SetupDocumentEventArgs e) { StyleDefinition hyperLinkStyle = e.Document.StyleRepository[RadDocumentDefaultStyles.HyperlinkStyleName]; hyperLinkStyle.SpanProperties.ForeColor = Colors.Green;//Color.FromRgb(0xff, 0x7a, 0xcc); var hyperlinks = e.Document.EnumerateChildrenOfType<HyperlinkRangeStart>(); RadDocumentEditor editor = new RadDocumentEditor(e.Document); editor.Document.History.IsEnabled = false; foreach (HyperlinkRangeStart hyperlink in hyperlinks) { e.Document.Selection.SelectAnnotationRange(hyperlink); editor.ChangeStyleName(RadDocumentDefaultStyles.HyperlinkStyleName); } e.Document.Selection.Clear(); editor.Document.History.IsEnabled = true; }
Html exported from RadRichTextBox will be shown in Outlook with some formatting issues related to lists. The text in a paragraph will be shown with the formatting of its bullet. The reason is that the content is exported to HTML as a styled list level which Outlook does not understand. The same applies to MS Word as well. This can also lead to formatting issues when the document is later imported in RichTextBox. You can check the attached screenshot for reference. Workaround: Change the styles to export as inline properties: htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
When document fragment containing consecutive spans with same style is inserted with RadRichTextBox.InsertFragment method, and the document is with specific structure (which is not exactly known), NullReferenceException in HierarchicalIndex.GetBoxByHierarchicalIndex could be thrown when text is typed in specific places in the document. Workaround: Ensure that such spans are merged before creating the fragment: var document = xamlProvider.Import(xaml); document.MergeSpansWithSameStyles(); var fragment = new DocumentFragment(document); rtb.InsertFragment(fragment); --------------------------------------- Sample call stack: System.NullReferenceException at Telerik.Windows.Documents.HierarchicalIndex.GetBoxByHierarchicalIndex(DocumentLayoutBox documentBox, HierarchicalIndex hierarchicalIndex) at Telerik.Windows.Documents.DocumentPosition.RestorePositionFromBoxIndex(Nullable`1 raiseEvent) at Telerik.Windows.Documents.Model.RadDocumentEditor.InsertTextInternal(String text, Span currentSpanStyle, Boolean explicitAcceptsReturn) at Telerik.Windows.Documents.Model.RadDocumentEditor.InsertFromUI(String text, Span currentSpanStyle, Boolean acceptsReturn) at Telerik.Windows.Controls.RadRichTextBox.Telerik.Windows.Documents.UI.ITextInputCommandsHandler.InsertText(String text) at Telerik.Windows.Documents.UI.CaretTextInputHandler.InsertText(String text) at Telerik.Windows.Documents.UI.CaretTextInputHandler.HandleTextInsertedWithoutIme(RadDocument document, String text) at Telerik.Windows.Documents.UI.CaretTextInputHandler.CaretUI_TextInserted(Object sender, TextInsertedEventArgs e) at Telerik.Windows.Documents.UI.Caret.OnTextInserted(Object sender, TextInsertedEventArgs e) at Telerik.Windows.Documents.UI.Caret.OnTextChanged() at Telerik.Windows.Documents.UI.Caret.Caret_TextChanged(Object sender, TextChangedEventArgs e) ... Fix available in LIB Version 2018.2.813.
This causes some problems if the hyperlink is edited and the document is exported and imported again.
Workaround:
private void RadRichTextBox1_DocumentChanged(object sender, EventArgs e)
{
var document = radRichTextEditor1.Document;
var fields = document.EnumerateChildrenOfType<FieldRangeStart>();
foreach (FieldRangeStart item in fields)
{
radRichTextEditor1.DeleteAnnotationRange(item);
}
}
When a table is on a page different than the first one and user clicks on the thumb for resizing the table row height, wrong value is calculated and passed to the setter of the TableRow's Height property. This leads to wrong table layout when the document is exported using RtfFormatProvider.
Provide option for configuring the measurement units (centimeters [cm], inches [in]) used throughout RadRichTextBox UI, including: - Ruler (currently supported and configurable through DocumentRuler.MeasurementUnit property which is of type UnitTypes) - Table dialogs - for indents, widths and heights - Paragraph indentation (currently shown only in points [pts]) - Section properties - header from top and footer from bottom - Page setup - columns width in Columns dialog - Page Margins and Page Size in Ribbon UI Currently parts of the dialogs and controls shows measures in pixels (actually DIPs), other in inches (e.g. ruler).
The RTF specifications states that the header of the document should start with "\rtfN" where N is the version of the RTF. Currently, the RtfFormatProvider do not save the version, but only "\rtf". Most software handles this case, but in some cases the document cannot be read.
When the caret position is inside Table and a page break is inserted, the table should be split into two tables with a page break between.
When a text doesn't specify font explicitly with \fN tag, and default character properties (\defchp) are not specified, or are specified but without font set, the font of the text is visualized with the default font - Verdana. Instead, the default font for the document should be used - defined with \deffN tag.
RadRichTextBox doesn't render a border that is not locally defined. In this case, the corresponding border from the applied table style should be used.
A paragraph is exported to HTML with properties from its bullet when the default document properties are customized. Here are the steps to reproduce: Change the document default font-size to 10.5 pt(14px). Change the document default font-family to "Calibri". Add two paragraphs with text. Apply a list to the paragraphs Export to HTML Import the resulted HTML. Observed: The paragraphs text is with font-family "Verdana" and font-size of 12pt Expected: The paragraphs should inherit its font properties from the document default properties. You could also check the attached Observed and expected screenshots.
We have a legacy system that generates RTF using some native RTF controls. The RTF generated by this application is compatible with MS wordpad. But seems that the RadRichTextBox is not compatible. The problem is when we use bullets. Consider we create an RTF with bullets, using legacy - * Legacy Bullet 1 * Legacy Bullet 2 * Legacy Bullet 3 Then, this is the RTF that is generated - {\rtf1\fbidis\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Segoe UI;}{\f1\fnil\fcharset0 Arial;}{\f2\fnil\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\ltrpar\cf1\lang1033\f0\fs22\par \pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360 Legacy Bullet 1\par \pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360\tx360 Legacy Bullet 2\par \pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360\tx360\tx360 Legacy Bullet 3\par \pard\ltrpar\tx360\tx360\tx360\par \f1\par } ---------------------------------------------------------------------- Now, if we open this RTF in Wordpad, then the bullets are displayed correctly. But the bullets are not displayed when we bind the RTF to RadRichTextBox. It displays something like this - Legacy Bullet 1 Legacy Bullet 2 Legacy Bullet 3 And after binding the original RTF, if we now try to get the RTF this is how it looks like - {\rtf\ansi\ansicpg1252\uc1\deff0\deflang1033{\fonttbl{\f0 Verdana;}{\f1 Segoe UI;}{\f2 Arial;}}{\colortbl\red0\green0\blue0 ;;}{\*\defchp\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone}{\*\defpap\sl276\slmult1\sa180}{\stylesheet{\s0\sqformat\spriority0\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\sl276\slmult1 Normal;}{\*\ts2\tsrowd\spriority59\trbrdrt\brdrnone\trbrdrb\brdrnone\trbrdrl\brdrnone\trbrdrr\brdrnone\trbrdrh\brdrnone\trbrdrv\brdrnone\trgaph0\clpadft3\clpadt0\clpadfr3\clpadr0\clpadfl3\clpadl0\clpadfb3\clpadb0\tsvertalt\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\sl276\slmult1 Table Normal;}}\nouicompat\viewkind4\paperw12240\paperh15840\margl1425\margr1425\margt1425\margb1425\deftab720\sectd\pgwsxn12240\pghsxn15840\marglsxn1425\margrsxn1425\margtsxn1425\margbsxn1425\headery720\footery720\pard\s0\ltrpar\sl240\slmult1{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 1}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 2}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 3}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1{\ltrch\f2\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}} -Amul.
When an enter is pressed the paragraph is split into two parts and does not apply the current editing style to the formatting symbol of the first part. Steps to reproduce: Add text to an empty paragraph. Increase the font-size. Press enter. Expected result: If the user starts to write the text should have its font properties from the current editing style. Expected result 2: If the client moves the caret around and then return to the beginning of the second paragraph it and start writing, the text should have its font properties from the formatting symbol(which are applied from current editing style when the paragraph has been split).
When the preferred width of the table is set to a percentage value and the columns inside have preferred width values in pixels, the bigger width should take precedence when showing the table. At this point, the table column widths are with higher priority.
RadRichTextBox/RadDocumentEditor's MailMerge(bool) method doesn't respect the startEachRecordOnNewPage parameter. When the parameter is set to 'false', records are still merged on different pages, instead of on one. Workaround: Use RadDocumentMerger to append the resultant documents: http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/features/merge-documents/append
Currently exported DOCX document may be visualized by MS Word with different highlight colors. There is a limitation in the document format which RadRichTextBox doesn't respect, and this could be avoided by unifying the palette in RichTextBox's UI with the one in MS Word. In RadRichTextBox, the highlight color picker has more colors than the one in MS Word. That is why when exporting paragraph with one of the additional colors, MS Word (the DOCX format) won't use it but will fallback to one of the available colors.
When the control is used in NoXaml scenario and the required resources are merged in the resources of the Window/UserControl containing RadRichTextBox, XamlParseException is thrown at runtime with a message "Cannot find resource named 'thumbStroke'." or the App.Current.Resources.MergedDictionaries is cleared. Workaround: Merge Telerik.Windows.Documents.xaml and Telerik.Windows.Controls.RichTextBoxUI.xaml in App.xaml. or Merge the resourced before initializing RadRichTextBox: App.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Documents;component/Themes/Styles/ImageAdornerUIResourcesDictionary.xaml", UriKind.RelativeOrAbsolute) }); Fix available in R3 2017 Official Release version.
Current implementation of Text UI automation pattern doesn't support obtaining the attributes of the selection, e.g. bold, italic, etc. The API allows returning custom ITextRangeProvider where the behavior could be implemented , but this requires a lot of work. If this is built-in, the API will allow getting the attributes as follows: var automationPeer = (RadRichTextBoxAutomationPeer)FrameworkElementAutomationPeer.FromElement(this.radRichTextBox); TextPattern textPattern = (TextPattern)automationPeer.GetPattern(PatternInterface.Text); object isItalic = textPattern.GetSelection()[0].GetAttributeValue(TextPattern.IsItalicAttribute); if (isItalic == TextPattern.MixedAttributeValue) { // mixed } else { bool italic = (bool)isItalic; } Currently, AutomationElement.NotSupported is always returned.