This is a migrated thread and some comments may be shown as answers.

Cannot see text on black background

5 Answers 42 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Iron
Veteran
Larry asked on 04 Mar 2021, 06:06 AM
     Perhaps I'm missing something obvious; apologies if so. I'm using a black background on my RichTextEditor and cannot see the text when I type (though it is there). I've tried the obvious properties of TextColor, etc.  What am I missing?

5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Mar 2021, 11:08 AM

Hello Larry,

TextColor property refers to the text that is currently selected or under the caret, meaning that this is formatting option of the text inside the editor.  So, if you already have loaded text, make sure it has the proper text color applied, for example through "<p style='color:#ffffff'>" tag.

Other than that, in case the editor is empty and you'd need to use white text color by default, you can subscribe to Focused event of the RichTextEditor and set the TextColor inside the handler:

private void richTextEditor_Focused(object sender, FocusEventArgs e)
{
    this.richTextEditor.TextColor = Color.White;
}

I hope I was of help. Let me know if any additional questions pop up.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Larry
Top achievements
Rank 1
Iron
Veteran
answered on 04 Mar 2021, 09:46 PM
Thanks, but that doesn't appear to work?  My scenario is using this control to allow a user to make notes (and make them as fancy as they like - colors, bold, etc.).  So - I start with an empty control and the user types.  However, even with the code above (and a black background), the typed text is not visible.
0
Yana
Telerik team
answered on 05 Mar 2021, 07:45 AM

Hello Larry,

Could you elaborate a little bit more on how you've tested it - on Android or iOS, on device or simulator?  I am asking as the snippet works properly on my side and it seems I am missing something here.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Larry
Top achievements
Rank 1
Iron
Veteran
answered on 06 Mar 2021, 03:14 AM

To say I can't explain what was going on is a gross understatement. After a zillion debugging hours, restarts, reboots, etc., it simply "starting working fine."

For future reference, note that the focused (and unfocused) events don't appear to fire. Try setting a breakpoint on the event handler code.

So, I'm (frazzled but) good.

Thanks.

0
Yana
Telerik team
answered on 08 Mar 2021, 06:05 AM

Hi Larry,

First, I am glad to hear you've managed to resolve it.

I guess the Xamarin.Forms project wasn't rebuilt with the latest changes (adding the event).  If something similar happens again,  you can try to delete bin and obj folders, and rebuilt explicitly the Xamarin project.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
RichTextEditor
Asked by
Larry
Top achievements
Rank 1
Iron
Veteran
Answers by
Yana
Telerik team
Larry
Top achievements
Rank 1
Iron
Veteran
Share this question
or