HTML DOM Document designMode Property

Definition and usage

designMode Attribute sets or returns whether the document is editable.

See also:

Element contentEditable attribute

Instance

Example 1

Get the design mode:

document.designMode;

Try it yourself

Example 2

Make the document editable:

document.designMode = "on";

Try it yourself

Syntax

Getting:

document.designMode

Setting:

document.designMode = "on|off"

Attribute value

Value Description
off Default. The document is not editable.
on The document is editable.

Browser support

All modern browsers support document.designMode:

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