To reproduce: 1. Insert a table 2. Select all cells in it 3. Press the Backspace key => the table is removed but the table adorner is still visible The adorner disappears if clicked
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;
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: - 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); }
The cell BackColor should be set when setting the paragraph BackColor.
Workaround: use the table properties dialog to set the back color.htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Classes;
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 the Fluent theme, the Font Size Dropdown of the SelectionMiniToolBar is not wide enough.