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.
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.
Each time the Styles Gallery becomes visible it triggers an update of each style which leads to increased CPU usage. Significant performance delay is not experienced as the update is executed in dispatcher and with delayed execution. However, a blink of the styles could be noticed.
When the LevelText of the list style is empty, PdfFormatProvider throws an IndexOutOfRangeException while trying to draw the bullet. Workaround: Ensure that the LevelText of the ListItemStyle is not an empty string: foreach (ListStyle listStyle in this.radRichTextBox.Document.ListManager.GetAllListStyles()) { foreach (ListLevelStyle level in listStyle.Levels) { if (string.IsNullOrEmpty(level.LevelText)) { level.LevelText = " "; } } }
When a span or text is placed in <a> tag, but 'href' and 'name' attributes are missing, then the span/text is not imported from the HTML document. Workaround: preprocess the HTML and add the 'href' attribute to all <a> elements. Steps to reproduce: 1. Import the following HTML: <html> <body> <a target="_blank">Some text</a> </body> </html> Expected: The hyperlink "Some text" is imported in the document. Actual: The span "Some text" is not imported.
All Microsoft Office applications (Outlook, Exchange, Word, Excel) that can produce HTML are creating them with all of the CSS stylings commented with HTML comment, as follows: <style><!-- CSS --></style> This is a problem as RadRichTextBox's HTML parser does not import the CSS when it is commented like that. Workaround: Remove the HTML comment from the CSS style tag.
Currently <big> and <small> tags are not supported and the text inside is not imported.
It seems that the characters of Arabic words are reversed on export. Moreover, Arabic letters has different letter forms according to their position in the word (contextual letter forms) - beginning, end, middle, isolated. It seems that same character should be exported to PDF with different charcode depending on the character positioning.
Check all possible shorthand properties, e.g. border-[left/top/right/bottom]. Also check CSS properties like border-[left/top/right/bottom]-[color/style/width].
When HTML attribute is set and the same property is set in CSS, the element should be styled according to the CSS values, because they have higher priority. For example: <table border="5" style="border: 1px solid black">
The memory leak is reproducible when the main thread is too busy to dispose objects used by RadDocument internally. Thus, the RadDocument instances are kept alive in the memory. Workaround: When the scenario includes back processing of documents: Start different threads responsible to perform the required operations and use the following code: Dispatcher dispatcher = Dispatcher.CurrentDispatcher; dispatcher.BeginInvokeShutdown(DispatcherPriority.Normal); Dispatcher.Run(); anywhere in the background thread processing the RadDocument.
Add support for = (Formula) fields, including the scenario with referencing other table cells. More information: https://support.office.com/en-us/article/Field-codes-Formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-US&rs=en-US&ad=US
The width of the image is inherited from the table element it is in when it doesn't have a specific width set to it. Sample HTML reproducing the problem is: <html> <body> <table style="width: 700px;"> <tbody> <tr> <td> <img src="" /> </td> </tr> </tbody> </table> </body> </html> Instead, the real size of the image should be used. Workaround: Subscribe to LoadImageFromUri and set size to the image. settings.LoadImageFromUrl += (s, arg) => { if (arg.Url != null) { string extension = Path.GetExtension(arg.Url); Uri uri = new Uri(arg.Url, UriKind.RelativeOrAbsolute); System.Net.WebClient oWebClient = new System.Net.WebClient(); using (MemoryStream stream = new MemoryStream()) { oWebClient.OpenRead(uri).CopyTo(stream); arg.ImageElement.Init(stream, extension); arg.ImageElement.Size = new Size(164, 80); e.Handled = true; } } };
When image watermark is set and its height is configured through DocumentWatermarkSettings.ImageSettings.Size.Height, the height is not respected. Steps to reproduce: 1. Insert a Watermark with size var watermarkSettings = new DocumentWatermarkSettings() { Type = WatermarkType.ImageWatermark, ImageSettings = new WatermarkImageSettings() { UriSource = new Uri("c:\1.jpg"), Size = new Size(200, 300) } }; Expected: The image is with the specified width and height. Actual: The height is different.
This property allows the user to set the transparency of the image watermark. In the OOXML, the property is written using the 'blacklevel' attribute of the image.
Add support for math type equations.
When floating image is all of the following: - is anchored to paragraph inside a table with negative offset. - is with text wrapping "Behind text" or "In front of text" it should be positioned outside of the table. Currently the image is always positioned fully inside the table.
RadRichTextBox.TabIndex property does not have effect. The TabIndex will remain at maximum and RadRichTextBox will be last in the tab order. Moreover, setting RadRichTextBox.IsTabStop to false also doesn't have effect. The issue is showstopper for the cases where RadRichTextBox is used along with other controls.
Performance of scrolling and editing is diminished when Track changes are enabled. Issue seems to be related to RevisionsToolTipLayer and occurs when more than a couple of paragraphs are inserted in the same revision. Workaround: remove the UI layer responsible for tooltips of revisions. [CustomUILayersBuilder] public class CustomLayersBuilder : UILayersBuilder { protected override void BuildUILayersOverride(IUILayerContainer uiLayerContainer) { uiLayerContainer.UILayers.Remove(DefaultUILayers.ToolTipLayer); } }
Currently saving to an .rtf document with footnotes strips the footnotes and endnotes.