How can I use css selector for contenteditable="true"
<div id="1" name="1" contentEditable="true"></div>
Use a CSS attribute selector:
div[contenteditable="true"] {
background: red;
}
In English, this means: "Find all divs which have an attribute of contenteditable with its value set to true." In the above example, we find all div elements that are contenteditables and give them a red background.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With