Switch on designMode in document object - Javascript DOM

Javascript examples for DOM:Element contentEditable

Description

Switch on designMode in document object

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Example</title> 
      <script type="text/javascript">
      function init() {/*from   w w  w.java 2 s  . c  o  m*/
         console.log(document.designMode);
         document.designMode = "On";
         document.body.contentEditable = 'true';
         console.log(document.designMode);
      }
   
      </script> 
   </head> 
   <body onload="init()">  
   </body>
</html>

Related Tutorials