4 ms·
I try it in chromium and firefox. I found that in both contenteditable="false wasn't editable.
by fikama 5y ago
I try it in chromium and firefox. I found that in both contenteditable="false wasn't editable.
- chrismorgan 5y agoMy apologies: contenteditable isn’t a boolean attribute as I thought, but rather an enumerated attribute, with "", "true" and "false" being valid values. https://html.spec.whatwg.org/multipage/interaction.html#attr-contenteditable https://html.spec.whatwg.org/multipage/interaction.html#attr... has the details. It comes down to the ability to specify contenteditable="false" within a contenteditable area, with the absence of a contenteditable attribute corresponding to the inherit state. I had quite forgotten that it was possible to nest something non-editable within something editable. Fairly similar to user-select behaviour, really.