To reproduce: - Open a document that contains symbols with the 2015 Q3 SP1 version. - Export the document using the docx format. - Open it again. Workaround: private void radRichTextEditor1_DocumentChanged(object sender, EventArgs e) { this.SelectAllMatches(""); this.radRichTextEditor1.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Symbol")); this.SelectAllMatches(""); this.radRichTextEditor1.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Symbol")); } private void SelectAllMatches(string toSearch) { this.radRichTextEditor1.Document.Selection.Clear(); DocumentTextSearch search = new DocumentTextSearch(this.radRichTextEditor1.Document); foreach (var textRange in search.FindAll(toSearch)) { this.radRichTextEditor1.Document.Selection.AddSelectionStart(textRange.StartPosition); this.radRichTextEditor1.Document.Selection.AddSelectionEnd(textRange.EndPosition); } }
How to reproduce: check the attached video Workaround: public partial class Form1 : Form { private RadButtonElement buttonHeader; private RadButtonElement buttonFooter; public Form1() { InitializeComponent(); this.buttonHeader = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonHeader", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1); this.buttonFooter = (RadButtonElement)this.richTextEditorRibbonBar1.GetType().GetField("buttonFooter", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.richTextEditorRibbonBar1); this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditModeChanged += RichTextBoxElement_IsInHeaderFooterEditModeChanged; } private void RichTextBoxElement_IsInHeaderFooterEditModeChanged(object sender, EventArgs e) { if (!this.radRichTextEditor1.RichTextBoxElement.IsInHeaderFooterEditMode) { this.buttonHeader.Enabled = true; this.buttonFooter.Enabled = true; } else { this.buttonHeader.Enabled = false; this.buttonFooter.Enabled = false; } } }
To reproduce: - Add some text and change its forecolor. - Add more text and change its highlighting - Save as rtf and open it in WordPad.
Workaround: private void ClearDictionaries(RadRichTextEditor editor) { var dictionaries = typeof(DocumentSpellChecker).GetField("dictionaries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(editor.SpellChecker) as Dictionary<CultureInfo, Lazy<IWordDictionary>>; dictionaries.Clear(); var customDictionaries = typeof(DocumentSpellChecker).GetField("customDictionaries", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(editor.SpellChecker) as Dictionary<CultureInfo, ICustomWordDictionary>; customDictionaries.Clear(); }
To reproduce: please refer to the attached sample project. You will notice that the exported HTML content from the left RadRichTextEditor is imported to the right and the bullets are not the same.
Workaround: use different instances of RibbonUI
Workaround: private void CopyButton_Click(object sender, EventArgs e) { this.radRichTextEditor1.Document.EnsureDocumentMeasuredAndArranged(); if (this.radRichTextEditor1.Document.Selection.IsEmpty) { return; } string selectedText = this.radRichTextEditor1.Document.Selection.GetSelectedText(); DocumentFragment fragmentToCopy = this.radRichTextEditor1.Document.Selection.CopySelectedDocumentElements(true); DataObject dataObject = new DataObject(); if (selectedText != "") { ClipboardEx.SetText(null, selectedText, dataObject); } ClipboardEx.SetDocument(fragmentToCopy, dataObject); ClipboardEx.SetDataObject(dataObject); }
To reproduce: try to hide the caret: this.radRichTextEditor1.CaretWidth = 0; Workaround: //Flow layout this.radRichTextEditor1.LayoutMode = DocumentLayoutMode.Flow; Telerik.WinControls.RichTextEditor.UI.DocumentWebLayoutPresenter webLayoutPresenter = this.radRichTextEditor1.RichTextBoxElement.ActiveEditorPresenter as Telerik.WinControls.RichTextEditor.UI.DocumentWebLayoutPresenter; webLayoutPresenter.Caret.Width = 0; //Page layout this.radRichTextEditor1.LayoutMode = DocumentLayoutMode.Paged; Telerik.WinControls.RichTextEditor.UI.DocumentPrintLayoutPresenter activeEditorPresenter1 = this.radRichTextEditor1.RichTextBoxElement.ActiveEditorPresenter as DocumentPrintLayoutPresenter; activeEditorPresenter1.Caret.Width = 0;
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
This functionality will decrease the size of the exported document.
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: 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; } } }
The new functionality should allow the developer to load custom fonts in the memory and then use them in RadRichTextEditor.
In certain fonts the caret is drawn on part of the last inputted character
To reproduce: run the project and maximize the form. When you enter some text you will notice that the text is cut off. Workaround: use paged layout.
To reproduce: please refer to the attached sample project and follow the steps in the gif file. Workaround: private void radRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is ChangeIntegratedWatermarkTypeCommand && this.radRichTextEditor1.LayoutMode!= Telerik.WinForms.Documents.Model.DocumentLayoutMode.Paged) { e.Cancel = true; } }