Skip to content

Instantly share code, notes, and snippets.

@xem
Last active July 30, 2023 09:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xem/91a7875060c05ed80632 to your computer and use it in GitHub Desktop.
Save xem/91a7875060c05ed80632 to your computer and use it in GitHub Desktop.
miniCodeEditor in 162b (Fx, Chrome, Opera)
<body oninput='f.srcdoc=t2[v="value"]+"<script>"+t0[v]+"</script><style>"+t1[v]'onload='for(i=3;i--;)e.innerHTML+="<textarea id=t"+i+" rows=9>"'id=e><iframe id=f>
@xem
Copy link
Author

xem commented Aug 1, 2014

Demo: https://rawgit.com/xem/91a7875060c05ed80632/raw/c2b6f5a60b53cdbc01508214267175e9b4b5c319/index.html

For the record, the old version didn't have an id on the iframe because it only worked on Fx at that time:
http://xem.github.io/miniCodeEditor/minimal.html

Now that it works on Blink too, I guess we can trim it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment