Document.designMode is a read/write instance property that controls whether the entire document is editable. Learn the "on" / "off" values, the classic iframe editor pattern, how it differs from contenteditable, and five examples with try-it labs.
01
Kind
Read / write
02
Values
on / off
03
Default
"off" (spec)
04
Scope
Whole document
05
Classic use
iframe editor
06
vs
contenteditable
Fundamentals
Introduction
Sometimes you want users to edit HTML the way they type in a word processor. One older but still supported approach is to turn on document design mode: the browser treats the whole document as an editable surface.
MDN: document.designMode controls whether the entire document is editable. Valid values are "on" and "off". The specification defaults to "off" (Firefox follows this; modern Chrome does too).
💡
Whole page vs one box
Turning designMode on for the main page makes navigation chrome and scripts’ host page editable too—usually you enable it on an iframe’scontentDocument instead (MDN’s example), or use contenteditable on a single element.
Document.designMode is a long-standing HTML Document property (on / off). Logos use the shared browser-image-sprite.png sprite from this project. Check MDN for historical value quirks.
✓ Widely available · Standard
Document.designMode
Read/write string — "on" or "off" — controlling whether the entire document is editable.
UniversalWidely available
Google ChromeFull support · Default off since Chrome 43
Full support
Mozilla FirefoxFull support · Spec default off
Full support
Apple SafariFull support · macOS & iOS
Full support
Microsoft EdgeFull support · Chromium
Full support
OperaFull support · Modern versions
Full support
Internet ExplorerSupported (legacy capitalization quirks)
Full support
Document.designModeExcellent
Bottom line: Use designMode for whole-document (often iframe) editing. Prefer contenteditable for scoped UI editors, and always sanitize saved HTML.
Wrap Up
Conclusion
Document.designMode turns whole-document editing on or off. It shines in classic iframe editors; for a single rich-text box, use contenteditable instead, and always treat user HTML carefully.
It controls whether the entire document is editable. Set it to "on" to allow editing the whole page (or iframe document), or "off" to turn editing off.
No. MDN does not mark Document.designMode as Deprecated, Experimental, or Non-standard. It remains a standard HTML Document property. Prefer contenteditable when you only need a single element editable.
According to MDN and the specification, valid values are the strings "on" and "off". The property is meant to default to "off".
MDN example: iframeNode.contentDocument.designMode = "on". That turns the iframe's document into an editable surface (classic rich-text pattern).
designMode edits the whole document. contenteditable (or contentEditable) makes one element or subtree editable — usually the better choice for modern UI editors.
Yes. MDN notes earlier Chrome/IE used "inherit", and IE6–10 capitalized values. Modern Chrome (43+) defaults to "off" and no longer supports "inherit".
Did you know?
Many early online rich-text editors were literally an empty iframe with designMode = "on" plus toolbar buttons calling document.execCommand(...). That stack still works in many browsers, but modern apps often use contenteditable or dedicated editor libraries instead.