designMode property (document)
Sets or returns a string value that indicates whether editing is enabled for the document.
If the design mode is enabled, the user can edit the entire contents of the document like in a WYSIWYG (What You See Is What You Get) editor. The designMode property is not supported by HTML elements, only the editable state of the entire document can be modified with it.
The contentEditable property is more useful, because it allows content editing for almost all HTML elements. The contentEditable property is supported by all commonly used browsers, but only from version 3 in Firefox. In earlier Firefox versions, the only way to insert editable content into your HTML page is to use an iframe element with designMode = 'on'.
You can find the related objects in the Supported by objects section below.
This property is read/write.
String that sets or retrieves the editing mode.
One of the following values:
|Document is not editable. Use the cross-browser 'off' value instead.|
|Document is editable.|
|Document is not editable.|
Example HTML code 1:
This example shows how to enable content editing with designMode property:
Did you find this example helpful?
User Contributed Comments