Switching between bulleted and numbered lists only affects current paragraph instead of changing the list for all paragraphs currently included in it. Steps to reproduce 1. Create a numbered list with several items 2. Click the bulleted list button Expected behavior: The entire list switches from numbered to bulleted Actual behavior: The current list item switches to bulleted but the rest of the list remains numbered. Workaround: When the ToggleBulletsCommand is executed, traverse the PreviousSiblings and NextSiblings of the current paragraph and change their list properties if they belong to the same list. Sample code attached. Note: the workaround will change the list properties only for the consecutive paragraphs of the same list and will create a selection to do so.
When RadRichTextBox for WPF is hosted in a WinForms application (through ElementHost), typing with Japanese IME duplicates the typed letters, which makes the control unusable with the default behavior. Possible workaround: Create custom caret. There are some suggestions in this forum thread: https://www.telerik.com/forums/richtextbox-doesn't-support-japanese-ime-when-hosted-in-winforms
The field result shows the number of pages the current section contains.
When the users select a table using the thumb provided by the TableAdorner, the table is selected but the Table Tools contextual tab in RadRichTextBoxRibbonUI is not activated. Workaround: Attach to SelectionChanged and move the caret position to the first position of the table when the selection range is only one and is of type Table. Sample code is attached.
Some of the methods in RadDocumentEditor/RadRichTextBox call RadDocument.EnsureDocumentMeasuredAndArranged(), but some don't, for example: - InsertAnnotationRange - InsertLine - ChangeAllFieldsDisplayMode This causes exceptions or incorrect behavior what layout is not performed on the document. Workaround: Call EnsureDocumentMeasuredAndArranged before the problematic methods.
If the empty run is defined with start-tag and end-tag the import is correct: <w:p> <w:r></w:r> </w:p> However, if it is defined with empty-element tag, its parent Paragraph is not imported: <w:p> <w:r/> </w:p> Fix available in R2 2018 SP1 release version.
When the document uses a font that cannot be found on the machine, it is substituted for another font. What should happen is to fall back to another font for the visualization, but to preserve the original font in the model. Partial workaround: for HTML import, the font can be preserved by subscribing to the FontSubstituting event: provider.ImportSettings.FontSubstituting += ImportSettings_FontSubstituting; private void ImportSettings_FontSubstituting(object sender, FontSubstitutingEventArgs e) { e.SubstitutionFontFamily = new FontFamily(e.OriginalFontName); }
When a merged cell contains more than one entire column, the caret is in the merged cell and you chose the option to delete the current column, the action is supposed to delete all the columns in the merged cell. What happens instead is that only the first column is deleted and the merged cell remains. Workaround: TableCell tableCell = this.radRichTextBox.Document.CaretPosition.GetCurrentInline().Parent.Parent as TableCell; if(tableCell == null) { return; } int columnSpan = tableCell.ColumnSpan; this.radRichTextBox.Document.History.BeginUndoGroup(); for (int i = 0; i < columnSpan; i++) { this.radRichTextBox.DeleteTableColumn(); } this.radRichTextBox.Document.History.EndUndoGroup("Delete Column");
The 'white-space' CSS property determines how whitespace inside an element is handled. The 'pre' value preserves the sequences of whitespaces and the newlines in the element content. This property value is supported by MS Word.
This would enable the customers to track the content that is being inserted and decline its insertion if needed.
If the position is moved to the end of a paragraph by clicking with the mouse in the empty space just left of the paragraph text, sometimes the subsequent text input (typing, pasting) is inserted at the beginning of the next paragraph, instead of at the end of the clicked one. The issue is somewhat random and cannot be reproduced consistently, though it's not hard to reproduce if clicking and typing is fast enough.
At this point, the FloatingUIContainers cannot be selected. Implement selection to enable the users to work easily with such elements.
When pressing Shift+Up(Down) should create a selection to the start(end) of the document when the caret position is on the first(last) line. Currently, in this case, a selection is not created. Such behavior can be achieved using the following approach: private void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e) { if (e.Command is MoveCaretCommand && System.Windows.Input.Keyboard.Modifiers == ModifierKeys.Shift) { var command = e.Command as MoveCaretCommand; MoveCaretDirections direction = (MoveCaretDirections)e.CommandParameter; if (direction == MoveCaretDirections.Up) { var positionOnFirstLine = new DocumentPosition(this.radRichTextBox.Document); positionOnFirstLine.MoveToFirstPositionInDocument(); if (this.radRichTextBox.Document.CaretPosition.Location.Y - positionOnFirstLine.Location.Y < 1) { this.radRichTextBox.Document.CaretPosition.MoveToPosition(positionOnFirstLine); e.Cancel = true; } } else if (direction == MoveCaretDirections.Down) { var positionOnLastLine = new DocumentPosition(this.radRichTextBox.Document); positionOnLastLine.MoveToLastPositionInDocument(); if (positionOnLastLine.Location.Y - this.radRichTextBox.Document.CaretPosition.Location.Y < 1) { this.radRichTextBox.Document.CaretPosition.MoveToPosition(positionOnLastLine); e.Cancel = true; } } } }
API ideas: - DocumentSelection: Get inlines between annotation start and end, e.g. DocumentSelection.EnumerateChildrenOfType<>(bool includePartiallySelectedElements) where T : DocumentElement - DocumentSelection: SelectAnnotationRange(AnnotationRangeStart start, bool includeAnnotation). Such method is present without the last parameter, but it always selects the annotation ranges
Steps to reproduce: 1. Insert a table into the document with borders enabled 2. Zoom out so the zoom level is below 100% Expected behavior: The borders are always rendered at a minimum of 1px width, even if the calculated size is below 1 at the current zoom level (This is what Word does) Actual behavior: Some of the borders do not render.
Seems that the algorithm is not showing the appropriate results when a word has apostrophe. For example typing "etre" does not suggest "être". A custom third-party spell checker library - NHunspell can be used. SDK Example demonstrating this approach can be found in our XAML-SDK portal: https://github.com/telerik/xaml-sdk/tree/master/RichTextBox/NHunspellSpellChecking
In MS Word, when track changes are enabled, the users can choose to show the revisions in balloons, similar to comments. Add such possibility in RadRichTextBox as well.
The properties applied locally to the content are not preserved and used for the new content when the user changes the paragraph indent. Workaround: Keep the properties in a variable and apply them after executing the command: StyleDefinition style; private void RadRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e) { if (e.Command is IncrementParagraphLeftIndentCommand) { this.radRichTextBox.CurrentEditingStyle.CopyPropertiesFrom(style); } } private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is IncrementParagraphLeftIndentCommand) { style = new StyleDefinition(this.radRichTextBox.CurrentEditingStyle); } }