The "initial" CSS keyword applies the initial value of a property to an element. At this point, the result shown in RadRichTextBox can be unexpected as this value is not considered but the style evaluation falls back to the default styles defined for the control and doesn't consider the ones defined in the document style. For example, setting background-color: initial; always results in black background.
There is a memory leak related to the referenced elements by style in the style repository from the main document. The referenced elements are from headers and footers.
When Justify text alignment is applied to a paragraph, it should not increase the space between word which are before the last tab symbol for each line. Steps to reproduce: - Open RadRichTextBox in Paged layout mode, default A4 section size - Type the following text: -- "Welcome Welcome Welcome Welcome Welcome " -- then tab symbol -- then "test1 test1 uncharacteristically" - Switch paragraph alignment to Justify. Expected: The space between 'Welcome' words remains the same in Left and Justify alignments. Actual: The space between 'Welcome' words is increased when Justify alignment is chosen, as compared to when Left is chosen.
There is a large performance hit when manipulating an area of the document with many annotation ranges in it. Fix available in LIB Version 2018.1.326.
WMF contains both bitmap and vector elements and currently RTB supports only the bitmap parts. We should consider adding support for the vector elements as well.
The List Override Table contains definitions that override the properties of another list definition.
The dialogs don't have an owner, thus they behave unexpected and can be easily lost from the user and block the UI. This applies to many of the RadWindow.Alert() invocations in the UI of RichTextBox.
A document contains a field in result mode different that the one specified in the export settings in the format providers (i.e. a field that need to be updated during the export), and this field is in a header/footer, and another header/footer contains a table with AutoFit to Window size. When this document is exported to docx or RTF, the table is exported with 0 width. The table is visualized splashed in RadRichTextBox, and MS Word behaves strangely and/or doesn't visualize the table at all. The bug is regression in 2018 R1. Workaround 1: Change the result mode of all fields in the headers/footers to match the one set in format provider export settings (Result by default) just prior the export. Workaround 2: Set DocxFormatProvider.ExportSettings.FieldResultMode to null. For the default format provider used from the default Save command, use the following: ((DocxFormatProvider)DocumentFormatProvidersManager.GetProviderByExtension("docx")).ExportSettings = new DocxExportSettings() { FieldResultMode = null }; Fix available in LIB Version 2018.2.723.
Currently, paragraphs that have applied a list style but their list level is set to -1 or another invalid value, cannot be imported due to an ArgumentOutOfRangeException. According to the specification, the scenario is invalid, though, in MS Word and WordPad, similar values are not respected.
Paragraph spacing from table style is not exported for each paragraph inside the table. The table style defines paragraph properties which should be respected when exporting the styles to HTML. Workaround: Apply the paragraph settings coming from the table style directly to the elements.foreach
(var table
in
radRichTextBox.Document.EnumerateChildrenOfType<Table>())
{
foreach
(var paragraph
in
table.EnumerateChildrenOfType<Paragraph>())
{
paragraph.LineSpacing = table.Style.ParagraphProperties.LineSpacing;
paragraph.LineSpacingType = table.Style.ParagraphProperties.LineSpacingType;
paragraph.AutomaticSpacingAfter= table.Style.ParagraphProperties.AutomaticSpacingAfter;
paragraph.AutomaticSpacingBefore = table.Style.ParagraphProperties.AutomaticSpacingBefore;
paragraph.SpacingAfter = table.Style.ParagraphProperties.SpacingAfter;
paragraph.SpacingBefore = table.Style.ParagraphProperties.SpacingBefore;
}
}
When the position on which the users right-click is an annotation start or end marker, the context menu doesn't provide suggestions about spellcheck errors. Steps to reproduce: 1. Type "The greater the better" in RadRichTextBox with enabled spellchecking 2. Turn on track changes 3. Move the caret to the 't' of "greater" 4. Insert 't' so the word becomes wrong 5. Right-click on the 't' letter inserted in step 4 Observed: The context menu doesn't show suggestions for fixing the misspelled word Expected: The context menu should suggest a fix
- Localization for "Simple text" in the Define New List Style dialog and Define New Style dialog at RadRichTextBox. - Levels (from 1st to 9th) are hardcoded in dialog's code behind and cannot be localized. (these are the items in the 'Apply Formatting to' comboBox)
The "Text Wrapping" string, used in the FloatingBlockPropertiesDialog lacks translations in Spanish and French. In the English and Turkish values, a space is missing between the words. Fix available in LIB Version 2018.1.416.
When pasting a big image in RichTextBox, it is pasted with its original size. It should be resized so it can fit on the page. Similar logic is available in the InsertPictureCommand. Workaround: private void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e) { if (!(e.Command is PasteCommand)) { return; } DocumentFragment res = ClipboardEx.GetDocumentFromClipboard("RadDocumentGUID"); if (res == null) { foreach (ClipboardHandler settings in ClipboardEx.ClipboardHandlers) { res = ClipboardEx.GetDocumentFromClipboard(settings.ClipboardDataFormat, settings.ClipboardStringFilter); } } if (res == null) { e.Cancel = true; var bitmapSource = Clipboard.GetImage(); if (bitmapSource == null) { return; } Padding sectionmargin = this.radRichTextBox.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection.ActualPageMargin; double originalPixelWidth = bitmapSource.Width; double originalPixelHeight = bitmapSource.Height; if (originalPixelWidth == 0 || originalPixelHeight == 0) { originalPixelWidth = 10; originalPixelHeight = 10; } double width = originalPixelWidth; double height = originalPixelHeight; if (this.radRichTextBox.Document.LayoutMode == DocumentLayoutMode.Paged) { Section currentSection = this.radRichTextBox.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection; var pageSize = (SizeF) currentSection.GetType().GetProperty("ActualPageSize", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(currentSection, null); double maxWidth = pageSize.Width - (sectionmargin.Left + sectionmargin.Right); double maxHeight = pageSize.Height - (sectionmargin.Top + sectionmargin.Bottom); width = Math.Min(maxWidth, width); height = Math.Min(maxHeight, height); } double ratio = originalPixelWidth / originalPixelHeight; width = Math.Min(width, height * ratio); height = width / ratio; Size size = new Size(width, height); ImageInline imageInline = new ImageInline(new WriteableBitmap(bitmapSource)); imageInline.Size = size; this.radRichTextBox.ActiveDocumentEditor.InsertInline(imageInline); } }
There are a number of Bitmap objects that are not disposed. Changing this behavior could improve the memory usage when exporting PDF documents.
Having a table with specified RowSpan and further exported to PDF does not draw the border. This is due to export optimization caused by the fact whether there is or is not a CellSpacing specified. Workaround: Set really small CellSpacing for the table.
Currently, RadRichTextBox only imports from HTML documents tables with spacing between cells, but it does not export tables with such style. It seems like the border-collapse: collapse value defined in the Table Normal style overrides the border-spacing value, which is applied to the cells. As a workaround, the document styles can be omitted from the exported HTML and the styling can be exported inline be changing the ExportSettings of HtmlFormatProvider: provider.ExportSettings.StylesExportMode = StylesExportMode.Inline; provider.ExportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles;
The caret gets a wrong size when positioned on annotation start/end.
The custom list styles from a document exported by RadRichTextBox's HtmlFormatProvider are not imported.
Loading large documents freezes the UI. Instead, the document could be imported and measured asynchronously in a background thread, and some progress indicator shown to the user.
Note: Image sources should be frozen when the document is loaded in a background thread.
Workaround: Following the steps:
- Import the document in a background thread using the specific format provider.
- Freeze all images in the document using the methods in the attached file.
- Set the document to RadRichTextBox in the main thread using a dispatcher: this.Dispatcher.Invoke(new Action(() => { this.radRichTextBox.Document = document; }));