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(); }
Support for math type equations.
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.
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: Use the following code and then select some text: private void radButton1_Click(object sender, EventArgs e) { TxtFormatProvider txtProvider = new TxtFormatProvider(); RichTextEditor.Document = txtProvider.Import(sampleText); RichTextEditor.Document.LineSpacingType = LineSpacingType.Exact; RichTextEditor.Document.LineSpacing =10; DocumentPosition startPosition = RichTextEditor.Document.CaretPosition; DocumentPosition endPosition = new DocumentPosition(startPosition); startPosition.MoveToStartOfDocumentElement(RichTextEditor.Document); endPosition.MoveToEndOfDocumentElement(RichTextEditor.Document); RichTextEditor.Document.Selection.Clear(); RichTextEditor.Document.Selection.AddSelectionStart(startPosition); RichTextEditor.Document.Selection.AddSelectionEnd(endPosition); RichTextEditor.RichTextBoxElement.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Segoe UI")); RichTextEditor.RichTextBoxElement.ChangeFontSize(Unit.PointToDip(10)); RichTextEditor.Document.Selection.Clear(); } Workaround: RichTextEditor.Document.LineSpacingType = LineSpacingType.Auto; RichTextEditor.Document.LineSpacing =.5;
The HtmlFormatProvider does not import correctly html content of div tags and css styles.
Some fonts don't include bold and italic font styles. Currently, text formatted with such fonts and with applied bold or italic formatting is exported without the italic or bold effect. Instead, the default typeface can be exported, and additional transformation could be applied to the letters itself - e.g. skew transform for the italic.
Note: It seems that the GlyphTypeface for such fonts is using a non-italic (non-bold) font file and has StyleSimulations property set to ItalicSimulation (BoldSimulation) which is used in order to render the glyphs italic.
Implement nested mail merge - creating mail merge reports using master-detail tables in a data source.
Typical example of this is creating an invoices with mail merge, where each invoice contains a list of items.
Workaround: for some scenarios creating custom merge field which evaluates to Table could simulate this behavior:
http://www.telerik.com/forums/merge-reports#lUdH39ww00SnEhTLLlrXwA
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.
RichTextEditor: Lists are always exported to HTML with Verdana font.
Changing the normal style or setting the DocumentInheritsDefaultStyleSettings has no effect.
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(); } } }
To reproduce:
public RadForm1()