Make the entire document editable:
document.designMode = "on";
The designMode property sets whether the document is editable or not.
<!DOCTYPE html> <html> <body> <p>This document is editable!</p> <p>Try editing any text inside this document.</p> <script> document.designMode = "on"; </script>/*w w w. j av a2 s. c o m*/ </body> </html>
The designMode property sets or gets whether the document is editable or not.
Property Values
Value | Description |
---|---|
off | Default value. The document is not editable |
on | The document is editable |
The designMode property returns a String, "on" or "off".