To reproduce:
this.radRichTextEditor1.Text = null;
If you remove the last span of a paragraph (on a measured document), using the inline collection, a NullReferenceException is thrown.
As a workaround: either make sure the manipulation happens on a non-measured document, or remove the span by using the RichTextEditor's API:
this.radRichTextEditor.Document.Selection.AddDocumentElementToSelection(span);
this.radRichTextEditor.Delete(false);
Open the Demo application >> RichTextEditor>> First Look example and open and empty document. Keep a random key pressed. You are expected to observe delayed text input:
MS Word offers "Go To" option in its Find and Replace dialog:
It is reasonable to add similar scrolling behavior when navigating in document, programatic scrolling and GoTo~() methods.
In the Fluent theme, the Font Size Dropdown of the SelectionMiniToolBar is not wide enough.
This is the used code snippet:
static void Main(string[] args)
{
Telerik.WinForms.Documents.Model.RadDocument templateDocument = GetDocument("Template.rtf");
Telerik.WinForms.Documents.Model.RadDocument contentDocument = GetDocument("Content.rtf");
Telerik.WinForms.Documents.Model.Merging.InsertDocumentOptions options = new Telerik.WinForms.Documents.Model.Merging.InsertDocumentOptions();
options.ConflictingStylesResolutionMode = Telerik.WinForms.Documents.Model.Merging.ConflictingStylesResolutionMode.RenameSourceStyle;
options.InsertLastParagraphMarker = true;
Telerik.WinForms.Documents.Model.RadDocumentEditor templateEditor = new Telerik.WinForms.Documents.Model.RadDocumentEditor(templateDocument);
templateEditor.InsertFragment(new Telerik.WinForms.Documents.Model.DocumentFragment(contentDocument));
string mergedDocumentFilePath = "MergeDocumentsWithRichTextEditor.rtf";
File.Delete(mergedDocumentFilePath);
WriteDocToFile(templateDocument, mergedDocumentFilePath);
}
private static Telerik.WinForms.Documents.Model.RadDocument GetDocument(string rtfFilePath)
{
Telerik.WinForms.Documents.Model.RadDocument document = null;
var rtfImporter = new Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider();
using (Stream stream = File.OpenRead(rtfFilePath))
{
document = rtfImporter.Import(stream);
}
return document;
}
private static void WriteDocToFile(Telerik.WinForms.Documents.Model.RadDocument doc, string filename)
{
var rtfExporter = new Telerik.WinForms.Documents.FormatProviders.Rtf.RtfFormatProvider();
string rtfText = rtfExporter.Export(doc);
File.WriteAllText(filename, rtfText);
Process.Start(filename);
}
Observed result:
Expected result: keep the After spacing as it is in the original documents.
In RadRichTextEditor:
In Word: