- ● jakeonrails 童鞋改成了一个支持 Ruby 代码高亮的编辑器 <a href="https://gist.github.com/4666256">https://gist.github.com/4666256
- 代码:
- data:text/html, <style type="text/CSS">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src1="<a href="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js">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/monokai");e.getSession().setMode("ace/mode/ruby");</script>
- ● montas 的改造:You can use textarea and make it “invisible” if you want autofocus.
- 代码:
- data:text/html, <textarea style="font-size: 1.5em; width: 100%; height: 100%; border: none; outline: none" autofocus />
- ● bgrins 的改造:编辑内容时,自动变换背景颜色;停止后变换白色。
- 代码:
- data:text/html, <html><head><link > html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">
- ● fvsch 的改造:
- 代码:
- data:text/html, <body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">
- //该片段来自于http://www.codesnippet.cn/detail/040220132109.html
来源: http://www.codesnippet.cn/detail/040220132109.html