The DOM designMode property in HTML is used to specify whether the document is editable or not. It can also be used to set the document editable.
- Set: This property is used to set the document editable or not.
document.designMode = "on|off";
- Get: This property is used to return the document is editable or not.
Property Value: This property contains two value which are listed below:
- off: It is the default value. In this mode the document is not editable.
- on: In this mode the document is editable.
Before Editing the paragraph:
After editing the paragraph:
Before Click on the button:
After clicking the button:
Supported Browsers: The browser supported by designMode method are listed below:
- Google Chrome
- Internet Explorer