Hello Navid,
Thank you for adding the details here. Please note that we have detailed descriptions and a reference to the ticket internally as well.
Do not hesitate to contact us if you have other questions.
Regards,
Dimitar
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Issue description:
When trying to change the font for a lot of text the font is not correctly updated.
It seems that if the selected text is too long, the font property of the current editing style is not properly reflected.
I have this code to monitor and identify the issue:
private void radRichTextEditor1_CurrentEditingStyleChanged(object sender, EventArgs e)
{
var style = this.radRichTextEditor1.CurrentEditingStyle;
this.CurrentFontLabel.Text = style.SpanProperties.FontFamily.ToString();
}
private void ArialButton_Click(object sender, EventArgs e)
{
ChangeFont("Arial");
}
private void ChangeFont(string fontName)
{
var font = new Telerik.WinControls.RichTextEditor.UI.FontFamily(fontName);
this.radRichTextEditor1.ChangeFontFamily(font);
}
Working scenario:
If the selected text is not very long when setting the font to 'Arial' with the button, the font reported in the CurrentEditingStyle.SpanProperties.FontFamily of the StyleChange event is correctly identified as 'Arial'.
Broken scenario:
If the selected text is too long when setting the font to 'Arial' with the button, the font reported in the CurrentEditingStyle.SpanProperties.FontFamily of the StyleChange event is incorrectly identified as 'Verdana'.
Reproduce:
In the attached WinForms solution:
Identified in Telerik version 2023.1.314.40 and 2022.1.118.40.
This makes it impossible to properly update the font of all text in the editor at once, when using a dropdown for the font, since the incorrectly updated 'Verdana' font would change it back due to the Change-events.