Note: it should be closed automatically when all words are corrected. To reproduce: 1. Enter some misspelled words and open the context menu with right mouse click. 2. Show the SpellCheckingDialog. 3. Add a word to the dictionary. The SpellCheckingDialog will be closed immediately. However, if you press to ignore the word/words, the dialog remains opened. Workaround: cancel the SpellCheckingDialog.FormClosing event except when the close button is clicked: public Form1() { InitializeComponent(); this.radRichTextEditor1.IsSpellCheckingEnabled = true; RadButton buttonClose = ((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).Controls["buttonClose"] as RadButton; buttonClose.MouseDown += buttonClose_MouseDown; ((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).FormClosing += SpellCheckingDialog_FormClosing; } bool shouldClose = false; private void buttonClose_MouseDown(object sender, MouseEventArgs e) { shouldClose = true; } private void SpellCheckingDialog_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason != CloseReason.FormOwnerClosing) { e.Cancel = !shouldClose; shouldClose = false; } }
How to reproduce: public Form1() { InitializeComponent(); richTextEditorRibbonBar1.AssociatedRichTextEditor = radRichTextEditor1; radRichTextEditor1.Insert("This is a example for the \"ContextMenu shows up even when disabled\" error. If you right click on a word nothing happens (just as it is supposed to be) now klick \"Find Next Error\" and there it is (not supposed to be)\n\nlkjds klsdjfio jlk sdjfi lsdifuioew rlsoidf sjdiuf oipds jifpodsuf "); radRichTextEditor1.IsContextMenuEnabled = false; } private void dropdown_PopupOpening(object sender, CancelEventArgs args) { args.Cancel = true; } Workaround: public Form1() { InitializeComponent(); richTextEditorRibbonBar1.AssociatedRichTextEditor = radRichTextEditor1; radRichTextEditor1.Insert("This is a example for the \"ContextMenu shows up even when disabled\" error. If you right click on a word nothing happens (just as it is supposed to be) now klick \"Find Next Error\" and there it is (not supposed to be)\n\nlkjds klsdjfio jlk sdjfi lsdifuioew rlsoidf sjdiuf oipds jifpodsuf "); radRichTextEditor1.IsContextMenuEnabled = false; FieldInfo fi = this.radRichTextEditor1.RichTextBoxElement.ContextMenu.GetType().GetField("radDropDownMenu", BindingFlags.Instance | BindingFlags.NonPublic); RadDropDownMenu dropdown = fi.GetValue(this.radRichTextEditor1.RichTextBoxElement.ContextMenu) as RadDropDownMenu; if (dropdown != null) { dropdown.PopupOpening += dropdown_PopupOpening; } } private void dropdown_PopupOpening(object sender, CancelEventArgs args) { args.Cancel = true; }
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); }
Workaround: use different instances of RibbonUI
To reproduce: - Add some text and change its forecolor. - Add more text and change its highlighting - Save as rtf and open it in WordPad.
The scenario is very common, as in MS Word the option Table -> Layout -> Cell Size -> AutoFit -> "AutoFit Contents" changes the PreferredWidth of the table and its columns to Auto. Also the tables imported from HTML have these properties set by default. Scenarios: - Auto-sized table occupies minimal space. - All auto-sized columns in a table (table itself could be, or could be not, auto-sized) should always be sized proportionally to their content length. Currently, such columns are sized equally in the case when there is enough space for all of the content, which is unexpected. (also see the attached images for the scenario with fixed-width table + auto-sized columns).
If there is sequence with more than one font info which is not declared in a separate group, they all are concatenated and recorded in the imported fonts as a single one with id from the last one. Here is such a problematic font table group: {\\fonttbl\\f0\\froman\\fcharset0 Times New Roman;\\f1\\froman\\fcharset0 Times New Roman;\\f2\\froman\\fcharset0 Times New Roman;\\f3\\froman\\fcharset0 Times New Roman;\\f4\\froman\\fcharset0 Times New Roman;\\f5\\froman\\fcharset0 Times New Roman;}
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); } }
To reproduce: 1 Please change the font via selection list first. 2 Set text cursor to font input field and select the whole text (if not already done). 3 Press backspace or delete key. 4 An error message appears. Workaround: protected override void DropDownListFont_SelectedIndexChanged(object sender, PositionChangedEventArgs e) { var ddl = sender as RadDropDownListElement; if (ddl.SelectedItem != null) { base.DropDownListFont_SelectedIndexChanged(sender, e); } }
To reproduce: private void radButton1_Click(object sender, EventArgs e) { var document = new RadDocument(); var section = new Section(); document.Sections.Add(section); var paragraph = new Paragraph(); section.Blocks.Add(paragraph); var span = new Span("BOLD"); span.FontWeight = FontWeights.Bold; paragraph.Inlines.Add(span); span = new Span(" REGULAR"); paragraph.Inlines.Add(span); editor.Document = document; var pdfExporter = new PdfFormatProvider(); var path = Path.GetTempFileName() + ".pdf"; using (var file = File.Create(path)) { pdfExporter.Export(document, file); file.Flush(); file.Close(); } Process.Start(path); } Workaround: export .docx file and use the RadWordsProcessing library to import the .doc file and export it to pdf: private void radButton1_Click(object sender, EventArgs e) { var document = new RadDocument(); var section = new Section(); document.Sections.Add(section); var paragraph = new Paragraph(); section.Blocks.Add(paragraph); var span = new Span("BOLD"); span.FontWeight = FontWeights.Bold; paragraph.Inlines.Add(span); span = new Span(" REGULAR"); paragraph.Inlines.Add(span); editor.Document = document; var wordExporter = new Telerik.WinForms.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider(); var wordPath = Path.GetTempFileName() + ".doc"; using (var file = File.Create(wordPath)) { wordExporter.Export(document, file); file.Flush(); file.Close(); } Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider(); using (Stream input = File.OpenRead(wordPath)) { Telerik.Windows.Documents.Flow.Model.RadFlowDocument doc = provider.Import(input); Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider(); string filePath = @"..\..\" + DateTime.Now.ToLongTimeString().Replace(":", "-"); using (var output = File.Create(filePath)) { pdfProvider.Export(doc, output); } Process.Start(filePath); } }
Local properties are not exported to HTML when style is applied over document element (paragraphs, spans, tables) in case the HtmlExportSettings.StyleExportMode is set to Inline. To reproduce: - Add two hyperlinks with differents font and font weights. - Export them with the following code: private void button1_Click(object sender, EventArgs e) { HtmlFormatProvider html_provider = default(HtmlFormatProvider); string htmlBody = null; html_provider = new HtmlFormatProvider(); html_provider.ExportSettings.StylesExportMode = StylesExportMode.Inline; html_provider.ExportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.ExportStylesAsCssClasses; htmlBody = html_provider.Export(radRichTextEditor1.Document); File.WriteAllText("test.html", htmlBody); } - Open the file and you will notice that the custom styles are not exported (the links are having the same style). Workaround: html_provider.ExportSettings.StylesExportMode = StylesExportMode.Classes;
Workaround: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radRichTextEditor1.IsSpellCheckingEnabled = true; this.radRichTextEditor1.Insert("SOooome wrrrrong wooooooooords."); this.radRichTextEditor1.CommandExecuted += radRichTextEditor1_CommandExecuted; } bool shouldProcess = true; private void radRichTextEditor1_CommandExecuted(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutedEventArgs e) { if (e.Command is DeleteCommand) { if (shouldProcess) { shouldProcess = false; RichTextEditorInputBehavior behavior = this.radRichTextEditor1.InputHandler; behavior.ProcessKeyDown(new KeyEventArgs(Keys.Back)); } shouldProcess = true; } } }
Workaround: string styleSuffix = "_1"; foreach (var importedStyle in rtfDoc.StyleRepository) { importedStyle.Name = string.Concat(importedStyle.Name, styleSuffix); }
To reproduce: - Add some misspelled words. - Enable the spell check - the layout is updated and the words are underlined. - Disable the spell check - the lines are not removed until one clicks in the RichTextEditor. Workaround: radRichTextEditor1.IsSpellCheckingEnabled = !radRichTextEditor1.IsSpellCheckingEnabled; radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Paged; radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Flow;
To reproduce: 1. Insert a table 2. Select all cells in it 3. Press the Backspace key => the table is removed but the table adorner is still visible The adorner disappears if clicked
To reproduce: Please refer to the attached sample application and video demonstrating the experience issue. Workaround: Set RadRichTextEditor to null in Form`s Dispose method: Protected Overrides Sub Dispose(ByVal disposing As Boolean) Me.RadRichTextEditor1 = Nothing Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub
To reproduce: - Set the layout to Paged. - Add a table - Switch the layout to Flow and try to resize it on the right most border. Workaround: Switch to paged layout and resize the table.