Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM isContentEditable property

HTML DOM isContentEditable property

HTML Element Object Reference Element object

Example

Check

Whether the element is editable:

var x = document.getElementById("myP").isContentEditable;

x The output is:

true

Try it »


Definition and Usage

The isContentEditable property returns whether the element's content is editable.

This attribute is read-only.

Tip: To modify the editable state of an element, use contentEditable attribute.


Browser support

The numbers in the table indicate the version number of the first browser that supports this property.

property
isContentEditable 11.0 5.5  3.0 3.2 10.6

Syntax

HTMLElementObject

.isContentEditable

Technical Details

Return Value: Boolean value, returns true if the element's content is editable, otherwise returns false.

Related pages

HTML reference: HTML contenteditable attribute


HTML Element Object Reference Element object