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!
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
To reproduce: - Open the demo application. - Go to the Table Styles example. - Open the TableBorders dialog from the context menu and hit reset all.
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); } } } };
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; } }
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.
The new functionality should allow the developer to load custom fonts in the memory and then use them in RadRichTextEditor.
Add support for shapes, and especially for shapes with textual content. In OOXML, shapes are represented by the wps:wsp element, and shapes with textual content by <wps:txbx>, <w:txbxContent>. Such shape can be added to a Word document using the Insert -> Text -> Text Box -> Draw Text Box, or through a shape's context menu -> Add Text. Note: Do not confuse with Text/Rich Text content controls (http://feedback.telerik.com/Project/154/Feedback/Details/156478 )
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; } }
To reproduce: Format a document with tables in MSWord. For example Insert a picture to the left and a table to the right. Import the document into RadRichTextBox. You will see that the formatting is not the same.
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.
How to reproduce: check the attached video
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; } } }
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
how to reproduce: check the attached video