HTML DOM Element isContentEditable
Example
Is "myP" element editable:
let answer = document.getElementById("myP").isContentEditable;
Try it Yourself »
Definition and Usage
The isContentEditable
property returns true
if the content of an
element is editable.
The isContentEditable
property is read-only.
Note
You can use the contentEditable property to change the editable state of an element.
See Also:
Syntax
element.isContentEditable
Return Value
Type | Description |
Boolean | true if the content of an element is editable,
otherwise false . |
Browser Support
element.isContentEditable()
is supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |