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;
Workaround: string styleSuffix = "_1"; foreach (var importedStyle in rtfDoc.StyleRepository) { importedStyle.Name = string.Concat(importedStyle.Name, styleSuffix); }
Implement commands and UI for producing labels using Mail Merge. Behind the scenes this is implemented as Table with the proper number of table columns and rows, and eventually (depending on the setup) NEXT field (https://support.office.com/en-us/article/Field-codes-Next-field-3862fad6-0297-411a-a4e7-6ff5bcf178fd?ui=en-US&rs=en-US&ad=US) - so this will eventually require implementing NEXT field. Note: In MS Word, this is in Mailings -> Start Mail Merge -> Labels...
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; } } }
To reproduce: - insert a fragmet from another RichtextEditor like this: private void Button_Click(object sender, RoutedEventArgs e) { radRichTextBox.Document.Sections.Clear(); radRichTextBox.Document.Sections.Add(new Section()); radRichTextBox.Document.CaretPosition.MoveToLastPositionInDocument(); radRichTextBox.DocumentEditor.InsertParagraph(); radRichTextBox.DocumentEditor.InsertFragment(new DocumentFragment(radRichTextEditor1.Document)); radRichTextBox.DocumentEditor.InsertParagraph(); } Workaround: There is no point of resetting the section in such way. Nevertheless, you can avoid the exception by using one of the following methods: radRichTextBox.Document.MeasureAndArrangeInDefaultSize(); radRichTextBox.UpdateEditorLayout();
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;
1. Open RadRichTexEditor and type the following text: "שדג:3" or open the attached file 2. Save the document as docx file 3. Compare the results in MS Word and in RadRichTexEditor Observed result: in RadRichTexEditor the text is visualized as: ":3שדג" Expected result: The text should be visualized as: "שדג:3"
To reproduce: - Copy the content from the attached document - do not copy the last row. - Remove the bookmarks like this: bookmarks = radRichTextEditor1.Document.GetAllBookmarks().ToArray(); foreach (BookmarkRangeStart item in bookmarks) { radRichTextEditor1.Document.GoToBookmark(item); radRichTextEditor1.DocumentEditor.DeleteBookmark(item); } Workaround: var invalidStarts = this.radRichTextBox.Document .EnumerateChildrenOfType<BookmarkRangeStart>() .Where(start => start.End == null) .ToList(); foreach (var invalidStart in invalidStarts) { invalidStart.Parent.Children.Remove(invalidStart); } Note that when this workaround is used the document history will be deleted as well, which means that the undo operation will no longer hold information for previous operations
Support for math type equations.
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;}
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).
Workaround: void radRichTextEditor1_CommandExecuting(object sender, CommandExecutingEventArgs e) { if (e.Command is PasteCommand) { e.Cancel = true; PasteNewText(); } } public void PasteNewText() { DocumentFragment clipboardDocument = null; string clipboardText = null; bool clipboardContainsData = false; if (ClipboardEx.ContainsDocument(null)) { clipboardDocument = ClipboardEx.GetDocument(); clipboardContainsData = true; } else if (ClipboardEx.ContainsText(null)) { clipboardText = ClipboardEx.GetText(null); clipboardContainsData = true; } if (!clipboardContainsData) { return; } if (clipboardDocument != null) { RadDocument doc = new RadDocument(); RadDocumentEditor editor = new RadDocumentEditor(doc); editor.InsertFragment(clipboardDocument); TxtFormatProvider provider = new TxtFormatProvider(); string plainText = provider.Export(doc); this.radRichTextEditor1.RichTextBoxElement.ActiveDocumentEditor.Insert(plainText); } else if (!string.IsNullOrEmpty(clipboardText)) { this.radRichTextEditor1.RichTextBoxElement.ActiveDocumentEditor.Insert(clipboardText); } }
Note: this problem is related to the following feedback item: http://feedback.telerik.com/Project/154/Feedback/Details/174882-fix-radrichtexteditor-spellcheckingdialog-should-not-be-closed-when-a-misspell You should apply the suggested workaround in order to be able to replicate the problem. Steps to reproduce: 1. Enter some misspelled words. 2. Open the spell checking form by using the context menu. 3. "Ignore" the first misspelled word. 4. The next wrong word is highlighted. If you add it to the dictionary, the previously ignored word is highlighted as well. Workaround: use the "Ignore All" option.