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>

try this

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>

try this

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>

try this

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }