To reproduce: var d = new RadDocument(); var s = d.GetStatisticsInfo(); Workaround: var d = new RadDocument(); if (d.Sections.Count > 0 && d.Sections.Last.Blocks.Count >0) { var s = d.GetStatisticsInfo(); }
Currently invalid attribute values, including invalid or empty values in CSS attributes in the 'style' attribute, could cause importing property with incorrect value, or NullReferenceException (the document cannot be imported). Examples: ---------------------------------------------------------- <table width=”*”> <tr> <td>More Random Text</td> </tr> </table> The table is imported with 0 width. Instead the width should not be set. ---------------------------------------------------------- <table style="font-size:;"> <tr> <td>More Random Text</td> </tr> </table> NullReferenceException is thrown. ---------------------------------------------------------- <p style='padding: 3px 3px 3xp 7px;'>test</p>
IndexOutOfRangeException is thrown.
----------------------------------------------------------Workaround: replace the invalid values before import: string importString = html.Replace("font-style: ;", "");
The field result shows the number of pages the current section contains.
The spacing between the letters is too big.
To reproduce: 1. Open the following article: https://aajtak.intoday.in/gallery/indonesian-tsunami-warning-earthquake-lombok-island-dead-body-1-24549.html 2. Copy its title 3. Paste in Notepad/Notepad++ 4. Copy from notepad 5. Paste in RTE
See attached!
When the rtf document contains a table as the one below and the empty declaration is used in the following structure, the document cannot be imported: {\fonttbl {\f0 Verdana;} {\f1 Times New Roman;} {\f2 ;} {\f3 Segoe UI;}}
The issue only reproduces on Windows 10( 1806). Check the attached video showing the result: Workaround: Handle the CommandExecuting event this way private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is ChangeFontFamilyCommand && e.CommandParameter.ToString() == "") { e.Cancel = true; } }
To reproduce: run the Demo application >> RichTextEditor >> First Look example and follow the steps illustrated in the attached gif file. 1. First add a footnote in the text 2. Than select a part of the footnote text or all text and use the context menu to cut the text 3. Then, paste the text in the document, it doesn't matter were. 4. Next step is to remove the footnote reference. 5.Then, scroll through the document and press the right mouse button to open the context menu. The object release should have been called and the context menu is disposed. If so the error occurs. Workaround: this.radRichTextEditor1.MouseClick += radRichTextEditor1_MouseClick; private void radRichTextEditor1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { if (this.radRichTextEditor1.RichTextBoxElement.ContextMenu != null) { FieldInfo fi = typeof(Telerik.WinControls.RichTextEditor.UI.ContextMenu).GetField("radDropDownMenu", BindingFlags.Instance | BindingFlags.NonPublic); RadDropDownMenu dropdown = fi.GetValue(this.radRichTextEditor1.RichTextBoxElement.ContextMenu) as RadDropDownMenu; if (dropdown.IsDisposed) { this.radRichTextEditor1.RichTextBoxElement.ContextMenu = new Telerik.WinControls.RichTextEditor.UI.ContextMenu(); } } } }
Add a property that can control whether a table row is allowed to break across pages or not.
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; } }
************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.WinForms.Documents.UI.UIProviders.WatermarkUIProvider.Arrange(UILayerUpdateContext uILayerUpdateContext) at Telerik.WinForms.Documents.UI.Layers.ProviderUILayerBase.ArrangeChildren() at Telerik.WinForms.Documents.UI.DocumentPrintPresenter.ArrnageUILayers() at Telerik.WinForms.Documents.UI.DocumentPrintPresenter.MeasureOverride(SizeF availableSize) at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize) at Telerik.WinControls.RadElement.Measure(SizeF availableSize) at Telerik.WinControls.RadElement.MeasureChildren(SizeF availableSize) at Telerik.WinControls.RichTextEditor.UI.FrameworkElement.MeasureOverride(SizeF availableSize) at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize) at Telerik.WinControls.RadElement.Measure(SizeF availableSize) at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout() at Telerik.WinForms.Documents.UI.DocumentPrintPresenter.Telerik.WinForms.RichTextEditor.IDocumentEditorPresenter.UpdateLayout() at Telerik.WinForms.RichTextEditor.RadRichTextBox.<>c__DisplayClass3.<UpdateEditorLayout>b__2() at Telerik.WinForms.RichTextEditor.RadRichTextBox.UpdateEditorLayout(Boolean focusCarret, Boolean updateCaretSize, Boolean async) at Telerik.WinForms.RichTextEditor.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value) at Telerik.WinForms.RichTextEditor.RadRichTextBox.Telerik.WinControls.UI.IPrintable.BeginPrint(RadPrintDocument sender, PrintEventArgs args) at Telerik.WinControls.UI.RadPrintDocument.OnBeginPrint(PrintEventArgs e) at System.Drawing.Printing.PrintDocument._OnBeginPrint(PrintEventArgs e) at System.Drawing.Printing.PrintController.Print(PrintDocument document) at System.Drawing.Printing.PrintDocument.Print() at System.Windows.Forms.PrintPreviewControl.ComputePreview() at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() To reproduce: please refer to the attached gi file demonstrating how to replicate the problem with the Demo application. 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; } }
Workaround: If possible set the layout mode to FlowNoWrap this.radRichTextEditor1.Document.LayoutMode = Telerik.WinForms.Documents.Model.DocumentLayoutMode.FlowNoWrap;
Currently unknown/unsupported elements are skipped, which potentially loses text content. Consider adding setting in HtmlImportOptions allowing the phrasing content (text) of these elements to be imported. Sample HTML: <html> <body> <test-test>test-test</test-test> <body/> </html> Browsers visualize it as "test-test", while RadRichTextBox doesn't import anything. MS Word imports such elements as inline elements (just like spans).
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.
<samp> HTML element could be imported as span with specific formatting. Currently it's just ommited.
Workaround: public TextEditorRadForm() { InitializeComponent(); ((RadForm)this.radRichTextEditor1.RichTextBoxElement.InsertCaptionDialog).Controls["radRichTextEditorLabel"].Text = ""; }
To reproduce: add a RadRichTextEditor with ribbon UI. Set the RichTextEditorRibbonBar's theme to Fluent at design time. When you run the application you will notice that the theme is not properly applied to the backstage view. Workaround: ThemeResolutionService.ApplicationThemeName = "Fluent";