Unplanned
Last Updated: 27 Apr 2026 10:16 by ADMIN
Jérôme
Created on: 27 Apr 2026 10:07
Category: RichTextEditor
Type: Bug Report
0
RichTextEditor: Underline color reset to black after export using RtfFormatProvider
When I create a new document and enter text, I change it to red, I underline the text: the underlined line changes to red (the text and the underline) but on the generated RTF document after export the underline becomes black.
1 comment
ADMIN
Nadya | Tech Support Engineer
Posted on: 27 Apr 2026 10:16

Hello, Jérôme,

Currently, you can use the following workaround:

private void RadRichTextEditor1_CommandExecuted(object sender, CommandExecutedEventArgs e)
 {
     if (e.Command is ToggleUnderlineCommand || e.Command is ChangeFontForeColorCommand)
     {
         SyncUnderlineColorForSelection();
     }
 }
 private void SyncUnderlineColorForSelection()
 {
     RadDocument document = this.radRichTextEditor1.Document;
     if (document == null)
         return;

     foreach (Span span in document.EnumerateChildrenOfType<Span>())
     {
         if (span.Underline)
         {
             span.UnderlineColor = span.ForeColor;
         }
     }
 }

Regards,
Nadya | Tech Support Engineer
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.