HTML DOM Element isContentEditable attribute

Definition and usage

isContentEditable The property returns whether the element content is editable. This property is read-only.

If the element content is editable isContentEditable Property returns true.

Tip:Please use the contentEditable attribute to change the editable state of the element.

See also:

contentEditable attribute

HTML contenteditable Property

Example

"myP" element is editable:

let answer = document.getElementById("myP").isContentEditable;

Try it yourself

Syntax

element.isContentEditable

Return value

Type Description
Boolean value If the element content is editable, it returns true; otherwise, it returns false.

Browser support

All browsers support element.isContentEditable():

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support