Find out if a <p> element is editable or not:
The result of x will be:
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.
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 |
Return Value: | A Boolean, returns true if the content of an element is editable, otherwise it returns false |
---|
HTML DOM reference: element.contentEditable property
HTML reference: HTML contenteditable attribute