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

Placeholder for empty RadRichTextBox

2 Answers 405 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Andi
Top achievements
Rank 1
Andi asked on 09 Apr 2021, 10:24 AM

Hi there,

very simple scenario - we have a RadRichTextBox and want to show a placeholder (ghost) when there is no content in it.
Same behavior like WatermarkTextBox

Found no simple solution for this... or I have overseen something..

Thank you, Andi

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 09 Apr 2021, 12:33 PM

Hi Andi,

There is no simple solution to this. What you can do is create a custom layer that displays the placeholder text. The text will be removed when the user starts typing. I have attached a small example that shows how this can be implemented. 

Let me know how this works for you. 

Regards,
Dimitar
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
Andi
Top achievements
Rank 1
answered on 20 Apr 2021, 08:45 AM

Thank you Dimitar. Your solution works in my case.

(Sorry for the delay - I am in too many projects....)

Tags
RichTextBox
Asked by
Andi
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andi
Top achievements
Rank 1
Share this question
or