In my CSS, I've included the following code:
[contentEditable=true]:empty:not(:focus):before{
content:attr(data-text)
}
This snippet allows me to display a placeholder inside a content-editable div when it is empty. Since I am using Material-UI Styles, I need to do something similar in my styles:
const styles = theme => ({
div[contentEditable=true]:empty:not(:focus):before: {
content:attr(data-text)
}
});
Do you have any suggestions on how I can achieve this? Any ideas would be greatly appreciated.
Thank you.