selectall-and-inerthtml-in-textarea-editing-host.html (272B)
1 <html> 2 <head> 3 <script type="text/javascript"> 4 5 function boom() 6 { 7 document.execCommand("selectAll", false, null); 8 document.execCommand("inserthtml", false, "<p>"); 9 } 10 11 </script> 12 </head> 13 14 <body onload="boom();"><textarea contenteditable="true"></textarea></body> 15 </html>