Skip to content

Instantly share code, notes, and snippets.

@xem
Last active July 30, 2023 09:57
Show Gist options
  • Save xem/0c9a3b19d82a419de26e5d1d8c2502ad to your computer and use it in GitHub Desktop.
Save xem/0c9a3b19d82a419de26e5d1d8c2502ad to your computer and use it in GitHub Desktop.
mini native live code editor
<body contenteditable oninput=eval(S.textContent)>
<h1>Hi! (edit me)</h1>
<script style="display:block;border:1px solid;;white-space:pre-wrap" id=S>
// JS (edit me)
console.log("test");
</script>
<style style="display:block;border:1px solid;white-space:pre-wrap">
/* CSS (edit me) */
* { background: #def }
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment