quick js editor [ 1009 views ]
Goal: a simple js editor from the browser
put the following to the address line…
1. simple way:
data:text/html, <html contenteditable>
this one is poor because of not focus, but here is the fixed version:
1.1 simple way with focus in the window:
data:text/html, <html contenteditable><body></body><script>javascript:window.document.body.focus();</script>
2. extended editor (big respect for the ace team! check it )
data:text/html, <div id="e" style="position:absolute;top:0;right:0;bottom:0;left:0;"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/xcode");e.getSession().setMode("ace/mode/javascript");</script>