Document: designMode property

document.designMode controls whether the entire document is editable. Valid values are "on" and "off". According to the specification, this property is meant to default to "off". Firefox follows this standard. The earlier versions of Chrome and IE default to "inherit". Starting in Chrome 43, the default is "off" and "inherit" is no longer supported. In IE6-10, the value is capitalized.

Value

A string indicating whether designMode is (or should be) set to on or off. Valid values are on and off.

Examples

Make an <iframe>'s document editable:

js
iframeNode.contentDocument.designMode = "on";

Specifications

Specification
HTML
# dom-document-designmode-dev

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
designMode
Chrome – Partial support
Chrome 1 – 35 (Release date: 2008-12-11)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Chrome – Full support
Chrome 36 (Release date: 2014-07-16)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Partial support
Firefox 1 – 68 (Release date: 2004-11-09)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Firefox – Full support
Firefox 69 (Release date: 2019-09-03)
footnote Full support
Opera – Full support
Opera 9 (Release date: 2006-06-20)
footnote Full support
Safari – Partial support
Safari 1 – 10 (Release date: 2003-06-23)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Partial support
Chrome Android 18 – 35 (Release date: 2012-06-27)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Chrome Android – Full support
Chrome Android 36 (Release date: 2014-07-16)
footnote Full support
Firefox for Android – Partial support
Firefox for Android 4 – 68 (Release date: 2011-03-29)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote Full support
Opera Android – Full support
Opera Android 10.1 (Release date: 2010-11-09)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 1 – 10 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Partial support
Samsung Internet 1 – 2.1 (Release date: 2013-04-27)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
Samsung Internet – Full support
Samsung Internet 3 (Release date: 2015-04-10)
footnote Full support
WebView Android – Partial support
WebView Android 4.4 – 4.4.3 (Release date: 2013-12-09)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
WebView Android – Full support
WebView Android 37 (Release date: 2014-09-03)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 1 – 10 (Release date: 2007-06-29)
footnote Partial support
footnote Only supported for HTMLDocument, not all Document objects.
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support

Legend

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

Full support
Full support
Partial support
Partial support
Has more compatibility info.

See also