<!DOCTYPE html> <html> <head> <script> function boom() { document.getElementById("i").focus(); document.documentElement.contentEditable = "true"; document.execCommand("inserthtml", false, "<table>"); document.execCommand("indent", false, null); document.execCommand("delete", false, null); } </script> </head> <body onload="boom();"><input id="i"></body> </html>