Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

RTE

Avatar

Level 3

Hi,

How to add a placeholder in RTE?

Thanks,Screenshot (201).png

Vishal Jain

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, RTE is not a input element but a div, you can implement custom solution like

https://stackoverflow.com/questions/20726174/placeholder-for-contenteditable-div 

 

form.cq-dialog .cq-dialog-content .cq-RichText-editable[contenteditable=true]:before{
  content: attr(placeholder);
  font-size: 14px;
  color: #254e72;
  font-style: italic;
}


Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi, RTE is not a input element but a div, you can implement custom solution like

https://stackoverflow.com/questions/20726174/placeholder-for-contenteditable-div 

 

form.cq-dialog .cq-dialog-content .cq-RichText-editable[contenteditable=true]:before{
  content: attr(placeholder);
  font-size: 14px;
  color: #254e72;
  font-style: italic;
}


Arun Patidar