There are lot of options using javascript, but if you want to do it in css. Try this:
[contentEditable=true]:empty:not(:focus):before {
content: attr(data-text)
}
<div contentEditable=true data-text="Enter text here"></div>
Demo
There are lot of options using javascript, but if you want to do it in css. Try this:
[contentEditable=true]:empty:not(:focus):before {
content: attr(data-text)
}
<div contentEditable=true data-text="Enter text here"></div>
Demo