HTMLElement.contentEditable

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

La propiedad contentEditable de la interfaz HTMLElement especifica si el elemento es editable o no. Este atributo puede tener los siguientes valores:

  • 'true' indica si el elemento es contenteditable.
  • 'false' indica que el elemento no puede ser editado.
  • 'inherit' indica que el elemento hereda el estado editable del padre.

Se puede usar la propiedad HTMLElement.isContentEditable para comprobar el valor Boolean de esta propiedad.

Sintáxis

editable = element.contentEditable
element.contentEditable = 'true'

Especificaciones

Specification
HTML
# contenteditable

Compatibilidad con navegadores

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
contentEditable
plaintext-only as a value

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
In development. Supported in a pre-release version.
In development. Supported in a pre-release version.

See also