How to reproduce: check the attached project and video Workaround: create a custom RichTextEditorRibbonBar Public Class CustomRichTextEditorRibbonBar Inherits RichTextEditorRibbonBar Protected Overrides Sub HandleFontStylePropertiesOnCurrentEditingStyleChanged() If Me.dropDownListFont.BindingContext Is Nothing Then Me.dropDownListFont.BindingContext = Me.BindingContext End If If Me.dropDownListFontSize.BindingContext Is Nothing Then Me.dropDownListFontSize.BindingContext = Me.BindingContext End If MyBase.HandleFontStylePropertiesOnCurrentEditingStyleChanged() End Sub End Class
1. Create a document containing a style with NextStyleName: StyleDefinition myStyle = new StyleDefinition(); myStyle.Type = StyleType.Table; myStyle.DisplayName = "My Style"; myStyle.Name = "myStyle"; myStyle.NextStyleName = RadDocumentDefaultStyles.HyperlinkStyleName; this.radRichTextBox.Document.StyleRepository.Add(myStyle); 2. Add several paragraphs and select some of them (ensure there is one using our custom style). 3. Create a DocumentFragment using the selection's CopySelectedDocumentElements 4. Convert the fragment to RadDocument and try to export it Observed: When exporting to DOCX and XAML, the style is missing. Exporting to RTF causes KeyNotFoundException. Expected: The style should be preserved in the exported document Workaround: After creating the document from the fragment, ensure all needed styles are copied and available.
Workaround: Set the next style property for all types except the Paragraph to an empty string foreach (var style in this.radRichTextBox.Document.StyleRepository) { if (style.Type!=Telerik.Windows.Documents.Model.Styles.StyleType.Paragraph && !string.IsNullOrEmpty(style.NextStyleName)) { style.NextStyleName = string.Empty; } }
To reproduce: - Add a table where the width is set to 100% - Import the table and the export it: private void radButton_Click(object sender, RoutedEventArgs e) { var provider = new HtmlFormatProvider(); string text = File.ReadAllText(@"..\..\default.html"); rtb1.Document = provider.Import(text); } private void radButton1_Click(object sender, RoutedEventArgs e) { var provider = new HtmlFormatProvider(); provider.ExportSettings.StylesExportMode = StylesExportMode.Inline; string content = provider.Export(rtb1.Document); File.WriteAllText(@"D:\test1.html", content); } Workaround: Leave the export mode intact.
The new functionality should allow the developer to load custom fonts in the memory and then use them in RadRichTextEditor.
How to reproduce: simply configure Polish keyboard and press [ALT GR] + [C], the added text is "©ć". The expected behavior would be to only add "ć" Workaround: Handle the CommandExecuting event: private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is InsertTextCommand && e.CommandParameter.ToString() == "©") { e.Cancel = true; } }
Se the attached video to reproduce.
How to reproduce: set the RadRichTextEditor.IsReadOnly property to true, focus the control, use the Ctrl + K shortcut. The InsertHyperlinkDialog will be opened. Workaround: handle the CommandExecuting event public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radRichTextEditor1.IsReadOnly = true; this.radRichTextEditor1.CommandExecuting += RadRichTextEditor1_CommandExecuting; } private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (this.radRichTextEditor1.IsReadOnly && e.Command is ShowInsertHyperlinkDialogCommand) { e.Cancel = true; } } }
Currently, the document won't be imported due to an exception when decoding the base64 string image source. The expected behavior is the document to be imported and the image to be shown as a missing image.
This functionality will decrease the size of the exported document.
How to reproduce: check the attached video
The bullets can have their own alignment. Implement import and export of this setting. In MS Word, this alignment can be set through the Numbering dropdown -> Define New Number Format
The following parts are with hard coded strings and cannot be localized: - Insert Caption (InsertCaptionDialog): Combo boxes for label and separator - Paragraph Properties (ParagraphPropertiesDialog): Units of spacing and indentation values (pt) - Tab Stops Properties (TabStopsPropertiesDialog): The text of the tabStopsToBeClearedTextBloc - Cross references: reference types Figure and Table - TOC and TOF: Heading and Figure, Caption labels - Document Ruler: Tooltips - FormattingColorPicker: The "No Color" string - ManageStylesDialog shows items "Modify" and "Delete" with hardcoded text.
Create different options for pasting (keep formatting, merge formatting, use destination styles). At this point, the document default styles are not copied in the document fragment, thus their loss is observed. Loss of formatting is also observed when: - copying from RadRichTextBox and pasting in Word - copying from RadRichTextBox and pasting in RadRichTextBox in another process. - copying from Word and pasting in RadRichTextBox
How to reproduce: check the attached video
How to reproduce: set the page view in backstage, add a page item and set its text to be very long Workaround: use the custom theme