How to reproduce: public partial class Form1 : Form { RadRichTextBox tb1; RadRichTextBox tb2; private bool shouldFocus = false; public Form1() { InitializeComponent(); tb1 = new RadRichTextBox(); this.Controls.Add(tb1); tb2 = new RadRichTextBox(); tb2.Location = new Point(200, 0); this.Controls.Add(tb2); this.Load += Form1_Load; } private void Form1_Load(object sender, EventArgs e) { StyleDefinition style = new StyleDefinition(); tb1.IsReadOnly = true; tb1.Document.Insert("text 1", style); tb2.Document.Insert("text 2", style); tb2.IsReadOnly = true; } private void radButton1_Click(object sender, EventArgs e) { tb1.IsReadOnly = false; tb2.IsReadOnly = false; tb1.Focus(); } } Workaround: public partial class Form1 : Form { RadRichTextBox tb1; RadRichTextBox tb2; private bool shouldFocus = false; public Form1() { InitializeComponent(); tb1 = new RadRichTextBox(); tb1.GotFocus += tb1_GotFocus; tb1.LostFocus += tb1_LostFocus; this.Controls.Add(tb1); tb2 = new RadRichTextBox(); tb2.Location = new Point(200, 0); tb2.GotFocus += tb2_GotFocus; tb2.LostFocus += tb2_LostFocus; this.Controls.Add(tb2); this.Load += Form1_Load; } private void tb2_LostFocus(object sender, EventArgs e) { shouldFocus = false; tb2.IsReadOnly = true; } private void tb2_GotFocus(object sender, EventArgs e) { if (shouldFocus) { tb2.IsReadOnly = false; } } private void tb1_LostFocus(object sender, EventArgs e) { tb1.IsReadOnly = true; } private void tb1_GotFocus(object sender, EventArgs e) { if (shouldFocus) { tb1.IsReadOnly = false; } } private void Form1_Load(object sender, EventArgs e) { StyleDefinition style = new StyleDefinition(); tb1.IsReadOnly = true; tb1.Document.Insert("text 1", style); tb2.Document.Insert("text 2", style); tb2.IsReadOnly = true; } private void radButton1_Click(object sender, EventArgs e) { if (shouldFocus) { tb2.Focus(); } else { shouldFocus = true; tb1.Focus(); } } }
When the RadRichTExtEditor.Document is rapidly changed not all memory is released Workaround: Point loc = radRichTextEditor1.Location; Size size = radRichTextEditor1.Size; radRichTextEditor1.Dispose(); radRichTextEditor1 = new RadRichTextEditor(); radRichTextEditor1.Location = loc; radRichTextEditor1.Size = size; this.Controls.Add(radRichTextEditor1);
If I drag&drop a RadRichTextEditor i want a wizard like the RichTextBox-WPF-Control. I don't like the ribbon style, because I need a compact editor. So I like the CommandBarStrip look of the "command bar ui"-demo or the ASP.NET Editor.
To reproduce: - Add RichTextEditorRibbonBar to a form and open it upon button click several times. - You will notice that the memory is constantly increasing. Workaround: protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } FieldInfo f1 = this.richTextEditorRibbonBar1.GetType().GetField("tabTableStyle", BindingFlags.NonPublic| BindingFlags.Instance); RichTextEditorRibbonTab tab1 = f1.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab1.Dispose(); FieldInfo f2 = this.richTextEditorRibbonBar1.GetType().GetField("tabTableLayout", BindingFlags.NonPublic | BindingFlags.Instance); RichTextEditorRibbonTab tab2 = f2.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab2.Dispose(); FieldInfo f3 = this.richTextEditorRibbonBar1.GetType().GetField("tabHeaderFooter", BindingFlags.NonPublic | BindingFlags.Instance); RichTextEditorRibbonTab tab3 = f3.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab3.Dispose(); base.Dispose(disposing); }
"http://" prefix is automatically added by the Insert Hyperlink Dialog when the provided URI is to local path or mapped drive, e.g. "Z:\temp". Workaround 1: Set HyperlinkPattern to something that matches file paths, e.g.: (this.radRichTextEditor1.RichTextBoxElement.InsertHyperlinkDialog as InsertHyperlinkDialog).HyperlinkPattern = ".*"; Workaround 2: Insert such paths with the "file://" prefix.
When you have more than one RadRichTextEditor controls on the form and you have selected text in both of theme, only the focused RadRichTextEditor should show the selection.
How to reproduce: create a table with 1px of the inner borders and 3px of the outer borders. The attached screenshots demonstrates the issue. A similar result can be also observed with other widths as well.
How to reproduce: private void radButton1_Click(object sender, EventArgs e) { RadPrintDocument doc = new RadPrintDocument(); doc.Margins = new Margins(0, 0, 10, 10); doc.AssociatedObject = this.radRichTextEditor1; RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(); dialog.Document = doc; dialog.ShowDialog(); } Workaround: apply the margins on the document loaded in the editor private void radButton1_Click(object sender, EventArgs e) { RadPrintDocument doc = new RadPrintDocument(); this.radRichTextEditor1.Document.SectionDefaultPageMargin = new Telerik.WinForms.Documents.Layout.Padding(0, 0, 10, 10); doc.AssociatedObject = this.radRichTextEditor1; RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(); dialog.Document = doc; dialog.ShowDialog(); }
To reproduce: - Add some full pages to the editor. - Remove all margin from the print settings and document settings. - PrintPreview the document. - Seth the print preview dialog zoom to 100% and compare the documents. - You will notice that the print document's content is smaller.
When CJK text (Chinese, Korean, Japanes) is copied from WordPad and paste into RadRichTextBox text, the characters are imported incorrectly (as '?' and as different characters). The same applies if WordPad document containing CJK is imported from RTF. The problem is related to the specified \fcharset134 RTF tag, which is not properly interpreted.
The HtmlFormatProvider does not import correctly html content of div tags and css styles.
Hi Team,
Greetings!
We recently bought your Tool for one our Windows Forms Project work in VS2019 (4.7.2 framework).
There is a need for us to have Emojis inside the editable Textbox / RichTextEditor in Color.
For example, if we paste Emojis inside the text editor, it should retain the color of the Emoji as it is.
Currently if we paste the Emoji inside the text editor, its only pasting the Emoji but losing it's color.
How to retain the color of the Emoji inside the editable Textbox / RichTextEditor ? Is there any property or so we need to set?
The users of our application can paste any kind of Emoji (like inbuilt Windows10 Operating System Emojis etc.,) and there is no limitation for this.
Kindly advice.
with regards,
Krish TS,
Senior Technical Programmer Analyst,
DXC.technology,
India.
When importing HTML files if the font from the style contains serif element the font does not get interpreted correctly. For example "font-family: 'Times New Roman','serif';" - this will not work, but this font-family: 'Times New Roman';" will work.
Merge all assemblies exept Telerik.WinControls.UI.Design.dll. Use the merged assembly in an application with RichTextEditorRibbonBar. The icons are missing.
To reproduce: string text = "<p style=\"font-family:Calibri; font-size:15pt;\">Hi,<br/><br/><br/><br/>Regards<br/></p>"; HtmlFormatProvider provider = new HtmlFormatProvider(); RadDocument document = new RadDocument(); document = provider.Import(text); radRichTextBox1.Document = document; Click on an empty line and you will see that the font is different.
To reproduce:
public RadForm1()