All bullet list levels are exported to HTML with list-style-type:disc. Instead, they should be exported with list-style-type:disc, list-style-type: circle;, and list-style-type: square; depending on the level - Level 1,4,7 are with disc, level 2,5,8 are with circle, and level 3,6,9 are with square for the default bullet list type. Note: There are more problems with the HTML export/import roundtrip in this use case: - indents FirstLineIndent, RightIndent, Left are set locally - this prevent the expected changing of indent when changing the list level. - formatting of the bullet (font for example) is set to the paragraph. Steps to reproduce: - Add bullet list with three levels. - Export to HTML. Expected: The browser show the list preserving the bullet styles. Actual: The browser visualizes the list with different bullet styles.
The bookmark decoration square bracket is visualized in a previous table cell if the parent table does not have content. The visualization of the ending bracket does not affect the location in the document of the bookmark range end. Steps to reproduce: Insert an empty table 3x3. Select the entire table. Insert bookmark. Toggle the bookmarks. RadRichTextBox has a ToggleBookmarks method which will visualize or hide the bookmark surrounding square brackets. You can also check the attached screenshot.
In some cases when an image is copied from an external source and pasted in the rich text box, the image is not displayed. This is caused by the Clipboard.GetImage() method used internally by the control. To work this around, you can subscribe for the CommandExecuting event of RadRichTextBox and manually get the image from the clipboard. private void Rtb_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { PasteCommand command = e.Command as PasteCommand; if (command != null && (Clipboard.GetData("DeviceIndependentBitmap") != null)) { //Get the image stream from the clipboard. //You can check the following blog post for an approach which you can use to get the image properly: //https://www.thomaslevesque.com/2009/02/05/wpf-paste-an-image-from-the-clipboard/ this.radRichTextBox.InsertImage(imageStream, "jpeg"); e.Cancel = true; } }
MS Word clears the character style property of a span when a new value equal to the default value is applied. This is applicable only when the span or the parent paragraph does not have associated style which has a local property defined for the same style property.
There is not defined behavior of tables without fixed column width in FlowNoWrap. They try to fill the unlimited space, so only tables with fixed width can be used in this mode. The expected behavior might be fitted column width to its content or auto fitted table width to window. This can cause a hang of the application or unexpected behavior while working with the table (e.g. the thumbs for resizing the column width appear after the column border instead over it). Workaround: Subscribe to CommandExecuted, get the inserted table and set a fixed width to it. Available in R1 2018 SP2 release version.
When the user enter text using the keyboard the PositionChanged event of the CaretPosition is not fired. The item's status changed to Declined - the LocationChanged event can be used to track when the location of the position has been changed.
XamlParseException is thrown when importing revision date time of track changes which is exported with different than invariant culture. Steps to reproduce: Set the current thread culture to "new CultureInfo("nb-NO")" Turn on track changes. Start the RTB and enter some text. Export to XAML. Import the previously exported XAML file. Observed result: XamlParseException is thrown when parsing the revision date time object. Available in LIB version: 2017.1.418
When the span properties are modified (e.g. a highlight color is applied), they should not affect the span properties of the text inserted after that. This applies for all span properties. Here are a part of them: - Highlight color - Foreground color - Font weight - Font family - Font style Currently, all the properties applied to the current span are inherited when the user starts typing next to it.
The focus stays in the combo box. Workaround: Attach to the DropDownClosed event of the combo box and focus the presenter: (this.radRichTextBox.ActiveEditorPresenter as Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter).Focus(); Fix available in LIB Version 2017.2.522.
The redo command can't be executed if a content outside of a permission range is selected. For comparison, the undo command can be executed. Steps to reproduce: 1. Add two paragraphs to the document with text. 2. Select the first paragraph and add permission range. 3. Protect the document. 4. Add text into the permission range. 5. Press Undo (Ctrl+Z). 6. Select text outside of the permission range. 7. Press Redo (Ctrl+R). Expected: the redo action should be executed. Fix available in LIB Version 2015.2.515.
Changing the IsEnable property of the document history should clear the undo and redo. Executing undo or redo over a document with changed structure will result in an invalid document. Steps to reproduce: 1. Add text to the RadRichTextBox. 2. Disable the document history. Expected: The undo and redo are cleared. Actual: the undo is not cleared and the MultipleUndoControl contains all changes.
Undoing the action could lead to InvalidCastException, NullReferenceException, and other unexpected behaviors in next interactions with the document. When the users didn't create a selection but rely on the caret position, the command creates selection on the current inline layout box internally. The selection's end position is on the range end, but it (the end) is not included in the actual selection. When the users try to undo, the range end is missing, which leads to incorrect visualization and different exceptions depending on the actions (when saving the document, when deleting the content, etc.). Workaround: In CommandExecuting, check whether the selection is empty and create one if so. If the selection's end position is on an annotation range end, move the position to the next one. Clear the selection on CommandExecuted. Code is attached.
A custom list applied to several paragraphs is not exported to HTML format with the required font-family and font-size. Steps to reproduce: 1. Create a custom list with custom font-size and custom font-family. (different from the default). 2. Apply the list to several paragraphs. 3. Set the StylesExportMode property of the ExportSetting of the HtmlFormatProvider to StylesExportMode.Inline (fp.ExportSettings.StylesExportMode = StylesExportMode.Inline) 4. Export to HTML. Actual: The bullets are exported with the default font-family Verdana and the default font-size. Expected: The bullets to be exported with the custom value for the font-family and font-size.
DocumentRuler.CreateHorizontalRuler and DocumentRulerCreateVerticalRuler properties are not always changing the visibility of the horizontal and vertical ruler when set to false. If the properties are set to false in XAML, the corresponding ruler parts are still visible. The problem is that the values of the properties are reset internally during the controls creation, and after the layout mode of the document is changed. Workaround: Set the properties in code behind, and reset them after layout mode change: public MainWindow() { InitializeComponent(); this.ruler.CreateHorizontalRuler = false; this.radRichTextBox.DocumentLayoutModeChanged += (sender, e) => this.ruler.CreateHorizontalRuler = false; }
If the font applied to text doesn't contain Bold or Italic typefaces, the text at the end of the line is clipped. Workaround: Switch to the old rendering mode (which is somewhat slower): this.radRichTextBox.TextRenderingMode = TextBlockRenderingMode.TextBlockWithPropertyCaching;
Tabs button in Paragraph Properties dialog is visible even when RadRichTextBox.TabStopsPropertiesDialog is not set. In addition, pressing the button in this scenario closes the Paragraph Properties dialog itself. As this property is automatically set using MEF, this situation could happen if the tabs dialog is missing in the the composition container. Workaround: Check whether the TabStopsPropertiesDialog is null and if true, then hide the TabsButton: var windowTabStopsPropertiesDialog = (this.radRichTextBox.TabStopsPropertiesDialog as RadWindow); var windowParagraphPropertiesDialog = (this.radRichTextBox.ParagraphPropertiesDialog as RadWindow); if (windowTabStopsPropertiesDialog == null) { (windowParagraphPropertiesDialog.FindName("TabsButton") as RadButton).Visibility = Visibility.Collapsed; }
The InsertTable command should copy the current style to all paragraphs in the new table.
Available in LIB Version 2017.2.619.
The vertical text alignment in repeated table header row is not consistent with the first row. Please check the attached screenshot.
When some cells are merged in one cell and context menu is displayed for the merged cell, "Merge Cells" option is still available in the menu. However it should not be available for a merged cell.