To reproduce, add a theme in design time and open the ThemeName drop down from the editor's SmartTag
Hi Team,
We found an issue in Spell Check Feature in RichTextEditor, the Spell Checking Dialog auto-correct the spelling issues on scroll without clicking on the "Change" button.
We are able to reproduce this in the Demo application. please have a look at the below screencast.
https://www.screencast.com/t/EieqvrvSiSq
Thank you.
RadRichTextEditor: The paste options popup stays visible when the control is hidden
Workaround:
((MiniToolBarBase)this.radRichTextEditor1.RichTextBoxElement.PasteOptionsPopup).Hide();
The ChangeFontStyle method does not work when setting Underline:
radRichTextEditor1.ChangeFontStyle( FontStyle.Underline);
Workaround:
radRichTextEditor1.ToggleUnderline();
To reproduce:
this.radRichTextEditor1.Text = null;
Invisible borders in html format are imported as black borders in RadRichTextBox Resolution: This issue is addressed in the new version of the control - RadRichTextEditor. Please use the new control instead the RadRichTextBox.
To reproduce: - Use the cut option in the context menu then dispose the rich text editor and collect the garbage. Workaround: Telerik.WinControls.RichTextEditor.UI.ContextMenu menu = textEditor.RichTextBoxElement.ContextMenu as Telerik.WinControls.RichTextEditor.UI.ContextMenu; textEditor.RichTextBoxElement.ContextMenu = null; RadDropDownMenu ddm = menu.GetType().GetField("radDropDownMenu", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(menu) as RadDropDownMenu;
To reproduce: - Export document with an inline UI elements to HTML. - Import the document. Workaround: - Manually export the UI elements information and then create new UI elements when the document is imported: void ImportSettings_InlineUIContainerImporting(object sender, InlineUIContainerImportingEventArgs e) { PropertyInfo property = typeof(InlineUIContainerImportingEventArgs).GetProperty("Handled"); property.GetSetMethod(true).Invoke(e, new object[] { true }); ObjectHandle handle = Activator.CreateInstance("Telerik.WinControls.UI", e.CommentContent); Object control = handle.Unwrap(); InlineUIContainer container = new InlineUIContainer(); RadElementUIContainer radContainer = new RadElementUIContainer(control as RadElement); container.UiElement = radContainer; container.Height = 30; container.Width = 300; e.TargetParagraph.Inlines.Add(container); } //export private void btnWrite_Click(object sender, EventArgs e) { HtmlFormatProvider provider = new HtmlFormatProvider(); provider.ExportSettings.InlineUIContainerExporting += ExportSettings_InlineUIContainerExporting; File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\TelerikUITest.html", provider.Export(this.radRichTextEditor1.Document)); } void ExportSettings_InlineUIContainerExporting(object sender, Telerik.WinForms.Documents.FormatProviders.Html.InlineUIContainerExportingEventArgs e) { string control = ((RadElementUIContainer)e.InlineUIContainer.UiElement).Element.ToString(); e.CommentContent = control; }
To reproduce: RadDocument document = new RadDocument(); Section section = new Section(); Paragraph p = new Paragraph(); Span span = new Span(); span.Text ="test" + Environment.NewLine + "test"; ReadOnlyRangeStart rangeStart = new ReadOnlyRangeStart(); ReadOnlyRangeEnd rangeEnd = new ReadOnlyRangeEnd(); rangeEnd.PairWithStart(rangeStart); p.Inlines.Add(rangeStart); p.Inlines.Add(span); p.Inlines.Add(rangeEnd); section.Blocks.Add(p); document.Sections.Add(section); this.radRichTextEditor1.Document = document; Workaround: add an empty span as last inline element in the paragraph: RadDocument document = new RadDocument(); Section section = new Section(); Paragraph p = new Paragraph(); Span span = new Span(); span.Text ="test" + Environment.NewLine + "test"; ReadOnlyRangeStart rangeStart = new ReadOnlyRangeStart(); ReadOnlyRangeEnd rangeEnd = new ReadOnlyRangeEnd(); rangeEnd.PairWithStart(rangeStart); p.Inlines.Add(rangeStart); p.Inlines.Add(span); p.Inlines.Add(rangeEnd); /////////////////////////////////////// Span emptySpan = new Span(); emptySpan.Text = " "; p.Inlines.Add(emptySpan); /////////////////////////////////////// section.Blocks.Add(p); document.Sections.Add(section); this.radRichTextEditor1.Document = document;
When some commands are executed the RibbonUI is not updated. For example: private void radButton1_Click(object sender, EventArgs e) { ToggleCommentsCommand command = new ToggleCommentsCommand(radRichTextEditor1.RichTextBoxElement); command.Execute(); } Workaround: var button = ribbonBar1.GetType().GetField("toggleButtonShowHideComments", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.ribbonBar1) as RadToggleButtonElement; button.ToggleState = (radRichTextEditor1.RichTextBoxElement.ShowComments == true) ? ToggleState.On : ToggleState.Off;
To reproduce: - Add some comments and try to navigate through them. - Try add or show/hide the comments while the cursor is in one of the comments. Workaround: Create a custom RichTextEditorRibbonBar and override the following methods: Public Class MyRichTextEditorRibbonBar Inherits RichTextEditorRibbonBar Protected Overrides Sub ButtonNewComment_Click(sender As Object, e As EventArgs) Dim command As New InsertCommentCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub ButtonDeleteComment_Click(sender As Object, e As EventArgs) Dim command As New DeleteCommentCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub ButtonPreviousComment_Click(sender As Object, e As EventArgs) Dim command As New GoToPreviousCommentCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub ButtonNextComment_Click(sender As Object, e As EventArgs) Dim command As New GoToNextCommentCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub ToggleButtonShowHideComments_ToggleStateChanged(sender As Object, args As StateChangedEventArgs) Dim command As New ToggleCommentsCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub ButtonDeleteAllComments_Click(sender As Object, e As EventArgs) Dim command As New DeleteAllCommentsCommand(Me.AssociatedRichTextEditor.RichTextBoxElement) Me.ExecuteCommand(command) End Sub Protected Overrides Sub HandleDocumentCommandExecuted(document As RadDocument) MyBase.HandleDocumentCommandExecuted(document) Dim hasComments As Boolean = Me.AssociatedRichTextEditor.Document.EnumerateChildrenOfType(Of CommentRangeStart)().Count() > 0 Me.buttonPreviousComment.Enabled = hasComments Me.buttonNextComment.Enabled = hasComments Me.buttonDeleteComment.Enabled = hasComments Me.buttonDeleteAllComments.Enabled = hasComments End Sub End Class