Skip to content

Instantly share code, notes, and snippets.

@cherifya
Last active December 12, 2015 01:38
Show Gist options
  • Select an option

  • Save cherifya/4692507 to your computer and use it in GitHub Desktop.

Select an option

Save cherifya/4692507 to your computer and use it in GitHub Desktop.
One line notepad in browser with Save button for saving the snippet. Copy and paste the line in your browser's address bar. And voila!
data:text/html;charset=utf-8, <title>TextEditor</title><body contenteditable style="font-size:1.5rem;font-family:'Monaco', sans-serif;line-height:1.4;max-width:70rem;margin:0 auto;padding:3rem;background-color:rgb(233,233,225);color:rgb(68,68,68);" spellcheck="false"> <textarea id="txtBody" style="font-size: 1.5em; width: 100%; height: 90%; font-family: inherit;" autofocus> </textarea> <button onClick="SaveTextArea()" style="margin-top: 20px; font-size: 1.1em;">Save</button> <script language="javascript" type="text/javascript"> function SaveTextArea() { window.location = "data:application/octet-stream," + escape(txtBody.value); } </script> </body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment