Skip to content

Instantly share code, notes, and snippets.

@eli-oat
Last active December 15, 2015 02:49
Show Gist options
  • Save eli-oat/5190169 to your computer and use it in GitHub Desktop.
Save eli-oat/5190169 to your computer and use it in GitHub Desktop.
Psychic Paper
<!DOCTYPE html><head><meta charset="utf-8"><title>psychic/paper</title><script>window.onload=function(){f1()};
function f1(){a=window.localStorage['e'];if(a) document.body.innerHTML=a};function f2(t,e){if(e.keyCode==13){window.localStorage['e']=t.innerHTML}}</script>data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></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/solarized_dark");e.getSession().setMode("ace/mode/html");</script>
<body contenteditable spellcheck="true" onkeypress="f2(this,event);"></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment