Element.contentEditable

« Element

The HTMLElement.contentEditable property is used to indicate whether or not the element is editable. This enumerated attribute can have the following values:

  • true, or the empty string, indicates that the element is editable.
  • false indicates that the element cannot be edited.
  • inherit indicates that the element inherits its parent's editable status.

Syntax

editable = element.contentEditable
element.contentEditable = "true"

Notes

You can use the HTMLElement.isContentEditable property to test the computed Boolean value of this property.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 11 3.0 (1.9) 6 10.6 3.2
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 3 1.0 (1.9) 6 Not supported 5

Specification

Document Tags and Contributors

 Last updated by: teoli,