Pressing Tab/Shift+Tab when caret position is at the beginning of a paragraph should change current paragraph FirstLineIndent instead of LeftIndent. First line indent should be changed to Document.DefaultTabWidth step. Workaround: private void RadRichTextEditor1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData != Keys.Tab) { return; } this.radRichTextEditor1.Insert("\t"); e.SuppressKeyPress = true; e.Handled = true; }
Add support for All Capitals (All caps) and Small Capitals (Small caps) run property. MS Word has such option in Home -> Font -> Dialog Launcher -> Font -> All Caps/Small Caps. All letters of such runs are visualized as capital letters. The corresponding elements in OOXML are <w:caps /> and <w:smallcaps />.
Add only a RichTextEditorRibbonBar without any other control on the form. If you run the application you will notice that it loads more than one second. We should investigate if it is possible and how to improve the initialization time.
In certain fonts the caret is drawn on part of the last inputted character
There is an issue with the way the editor decides what width to render a table. The example I have encountered is in an HTML email from Outlook that contained a table. Whatever way Outlook composes the HTML, it adds a width attribute and a style attribute to the table's opening tag: <table width="0" style="width: 500px;"> In this situation, the inline style should take precedence over the width attribute (the width attribute is actually deprecated as of HTML5). This is how all common browsers behave. You can see in the attached 1_browser.png that Chrome correctly renders the table at 500px; However the RadRichtextEditor component incorrectly renders the table at width 0 as shown in attached 2_RadRichtextEditor.png, ignoring the width specified in the style attribute. Curiously, other CSS rules in the style attribute are correctly interpreted. For example: <table width="0" style="width: 500px;font-weight:bold;"> will display a table of zero width with bold text in the RadRichTextEditor. Thanks guys!
Workaround: To clear a given property, basing on some logic which determines if it should be cleared. For example this.radRichTextEditor1.CommandExecuting += (s, e) => { if (e.Command is ChangeStyleNameCommand) { var style = this.radRichTextEditor1.Document.StyleRepository.GetValueOrNull(e.CommandParameter.ToString()); if (style.Type == Telerik.WinForms.Documents.Model.Styles.StyleType.Paragraph) { Paragraph paragraph = this.radRichTextEditor1.Document.CaretPosition.GetCurrentParagraphBox().AssociatedParagraph; foreach (Span span in paragraph.EnumerateChildrenOfType<Span>()) { span.ClearValue(Span.FontFamilyProperty); span.ClearValue(Span.FontSizeProperty); } } } };
To reproduce: - Open the demo application. - Go to the Table Styles example. - Open the TableBorders dialog from the context menu and hit reset all.
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; } }