HTML DOM isContentEditable Property
Example
Find out if a <p> element is editable or not:
var x = document.getElementById("myP").isContentEditable;
The result of x will be:
true
Try it yourself »
Definition and Usage
The isContentEditable property returns whether the content of an element is editable or not.
This property is read-only.
Tip: Use the contentEditable property to change the editable state of an element.
Browser Support
The numbers in the table specify the first browser version that fully supports the isContentEditable property.
Property | |||||
---|---|---|---|---|---|
isContentEditable | 11.0 | 5.5 | 3.0 | 3.2 | 10.6 |
Syntax
HTMLElementObject.isContentEditable
Technical Details
Return Value: | A Boolean, returns true if the content of an element is editable, otherwise it returns false |
---|
Related Pages
HTML DOM reference: element.contentEditable property
HTML reference: HTML contenteditable attribute
Element Object