Element.contentEditable

Table of contents

  1. 1. Summary
  2. 2. Syntax
  3. 3. Notes
  4. 4. Browser compatibility
  5. 5. Specification

Introduced in Gecko 1.9

(Firefox 3)
« Gecko DOM Reference

Summary

contentEditable 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 element.isContentEditable property to test the computed Boolean value of this property.

Browser compatibility

  • Desktop
  • Mobile

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 -- 5

Tags (3)

Edit tags

Attachments (0)

 

Attach file