If you insert an InlineUIContainer with a RadTextBoxElement, you should be able to export its content when exporting the whole document.
If the main document part of a DOCX document is with name different than "document.xml", for example "document2.xml", the content of the document is not imported. Such documents are created by OpenXML SDK, if for example this tutorial is followed: How to: Convert a word processing document from the DOCM to the DOCX file format - http://tpdogfood.telerik.com/msdn.microsoft.com/en-us/library/office/gg188063(v=office.15).aspx.
To reproduce: - Export rtf file with a bullet list - use the old RadRichTextBox. - Import the file in the RadRichTextEditor in WebLayout mode. - The entire list is shifted to the left and the bullets are not visible. The issue is present because the old RadRichTextBox was exporting bullets with negative indent and the WebLayout mode always starts from 0.
Whed the form is resized at some point the text of the items is not visible and there is a lot of free space.
When highlighting text inside the richtexteditor control I receive a null reference exception.
To reproduce: Import the attached sample.html in RadRichTextEditor. Afterwards, export the content by using HtmlFormatProvider. You will notice that the page breaks are not exported and if you import the exported file, you will see the difference. Please refer to the attached screenshot.
To reproduce: 1. Create a UserControl. 2. Drag from the Toolbox a RichTextEditorRibbonBar and drop it onto the UserControl. 3. Use the following code: Sub New() InitializeComponent() Me.RichTextEditorRibbonBar1.CloseButton = False Me.RichTextEditorRibbonBar1.MinimizeButton = False Me.RichTextEditorRibbonBar1.MaximizeButton = False End Sub You will notice that the header is cut off. Workaround: in order to hide the system buttons, use the following code: Me.RichTextEditorRibbonBar1.RibbonBarElement.RibbonCaption.SystemButtons.Visibility = Telerik.WinControls.ElementVisibility.Hidden
Please refer to the attached gif file.
One should be able to change the document while the Find/Replace dialog is open.
If you populate the document with more than one section as shown below: Section Section1 = radRichTextEditor.Document.Sections(0); Paragraph Paragraph1 = new Paragraph(); Span Span1 = new Span("Thank you for choosing Telerik"); Section1.Blocks.Add(Paragraph1); Section Section2 = new Section(); Paragraph Paragraph2 = new Paragraph(); Paragraph2.Inlines.Add(image); Section2.Blocks.Add(Paragraph2); radRichTextEditor..Document.Sections.Add(Section2); then mark as selected the space after the first span, then try to type a character, a NullReferenceException will be thrown. WORKAROUND: class MyInputBehavior : RichTextEditor.RichTextEditorInputBehavior { public MyInputBehavior(RadRichTextBox editor) : base(editor) { } public override void InsertText(string text) { if (this.RichTextBox.IsReadOnly) { return; } Telerik.WinForms.Documents.UI.CaretTextInputHandler handler = null; DocumentPrintLayoutPresenter printLayout = this.RichTextBox.ActiveEditorPresenter as DocumentPrintLayoutPresenter; if (printLayout != null) { DocumentPagePresenter pagePresenter = printLayout.GetFocusedPresenter(); if (pagePresenter == null) { pagePresenter = ((Canvas)printLayout.Content).Children[0] as DocumentPagePresenter; } handler = pagePresenter != null ? pagePresenter.CaretTextInputHandler : null; } DocumentWebLayoutPresenter webLayout = this.RichTextBox.ActiveEditorPresenter as DocumentWebLayoutPresenter; if (webLayout != null) { handler = webLayout.CaretTextInputHandler; } if (handler != null) { handler.HandleTextInsertedWithoutIme(this.RichTextBox.ActiveEditor.Document, text); } } } radRichTextEditor.InputHandler = New MyInputBehavior(radRichTextEditor.RichTextBoxElement)
To reproduce: - Start the demo application - Type some text and try to make it bold with the bold button from the ribbon. Workaround: void richTextEditorRibbonBar1_MouseDown(object sender, MouseEventArgs e) { radRichTextEditor1.RichTextBoxElement.SelectionMiniToolBar.Hide(); }
To reproduce: Seth the default font like this: radRichTextEditor1.Document.StyleRepository[RadDocumentDefaultStyles.NormalStyleName].SpanProperties.FontFamily = new Telerik.WinControls.RichTextEditor.UI.FontFamily("Segoe Script"); radRichTextEditor1.RichTextBoxElement.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Segoe Script")); radRichTextEditor1.RichTextBoxElement.ChangeFontSize(Unit.PointToDip(12)); radRichTextEditor1.RichTextBoxElement.ChangeFontStyle(Telerik.WinControls.RichTextEditor.UI.FontStyles.Italic); radRichTextEditor1.RichTextBoxElement.ChangeFontWeight(Telerik.WinControls.RichTextEditor.UI.FontWeights.Bold); Start the application and insert header footer and endnotes.
To reproduce: Add image like this: void button_Click1(object sender, EventArgs e) { Section section = new Section(); Paragraph paragraph = new Paragraph(); ImageInline image; Telerik.WinControls.RichTextEditor.UI.Size size = new Telerik.WinControls.RichTextEditor.UI.Size(236, 50); using (MemoryStream ms = new MemoryStream()) { System.Drawing.Image.FromFile(@"C:\img\delete.png").Save(ms, System.Drawing.Imaging.ImageFormat.Png); image = new ImageInline(ms, size, "png"); } paragraph.Inlines.Add(image); section.Children.Add(paragraph); this.radRichTextEditor1.Document.Sections.Add(section); } Workaround: Manually update the layout: this.radRichTextEditor1.UpdateEditorLayout();
To reproduce: - Add comment and try to select the text with the mouse. Workaround: use keyboard to select the desired text
To reproduce: - Add several RadRichTextEditors to a form. - Change the icon of the FontPropertiesDialog. - Close the form and force the garbage collector. Workaround: protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); foreach (var item in this.Controls) { var rte = item as RadRichTextEditor; if (rte != null) { ((FontPropertiesDialog)rte.RichTextBoxElement.FontPropertiesDialog).Dispose(); } } }
To reproduce: - Associate the ribbon with the RichtextEditor - Subscribe to the DocumentContentChanged and start the application. - The event is fired because the ribbon is making changes to the document. Workaround: void Form1_Shown(object sender, EventArgs e) { ribbonBar1.AssociatedRichTextEditor = radRichTextEditor1; }
The "Style" gallery is reinitialized each time the AssociatedRichTextEditor is changed.