Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

RTE

Avatar

Level 1

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;
}

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;
}