This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The HTMLElement.isContentEditable read-only property returns a boolean value that is true if the contents of the element are editable; otherwise it returns false.
A boolean value.
<p id="firstParagraph">Uneditable Paragraph</p> <p id="secondParagraph" contenteditable="true">Editable Paragraph</p> <p id="infoText1">Is the first paragraph editable?</p> <p id="infoText2">Is the second paragraph editable?</p>
const firstParagraph = document.getElementById("firstParagraph");
const secondParagraph = document.getElementById("secondParagraph");
const infoText1 = document.getElementById("infoText1");
const infoText2 = document.getElementById("infoText2");
infoText1.textContent += ` ${firstParagraph.isContentEditable}`;
infoText2.textContent += ` ${secondParagraph.isContentEditable}`;
| Specification |
|---|
| HTML> # dom-iscontenteditable-dev> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
isContentEditable |
1 | 12 | 4 | ≤12.1 | 3 | 18 | 4 | ≤12.1 | 1 | 1.0 | 4.4 | 1 |
HTMLElement/contentEditablecontenteditable global attribute.
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/isContentEditable