Skip to content

Instantly share code, notes, and snippets.

@MisterPoppet
Created February 3, 2013 22:15
Show Gist options
  • Save MisterPoppet/4703934 to your computer and use it in GitHub Desktop.
Save MisterPoppet/4703934 to your computer and use it in GitHub Desktop.
This opens an editor in a new window.
javascript:(function(){var w = window.open();w.document.write('<title>Text Editor</title><link href=\'http://fonts.googleapis.com/css?family=Josefin+Sans:300\' rel=\'stylesheet\' type=\'text/css\'><body style="background: rgb(117,101,71); padding:1em;padding-bottom:7em"> <textarea id="txtBody" style="resize:none;font-family: \'Josefin Sans\', sans-serif; color: rgb(117,101,71); background: rgb(230,220,202); font-size: 2.5em; width: 100%; height: 100%; border: none; padding: 1em; outline: none; border-radius:8px; margin-bottom:10px" autofocus> </textarea> </body> <button onClick="SaveTextArea()" style="float:right; font-size:20px; border-radius:8px;background: rgb(230,220,202);margin-top:8px;border:none;padding:12px;padding-bottom:3px;text-transform:uppercase;cursor:pointer;color: rgb(117,101,71);font-family: \'Josefin Sans\', sans-serif;">SAVE this shit</button> <script language="javascript" type="text/javascript"> function SaveTextArea() { window.location = "data:application/octet-stream," + escape(txtBody.value); } </script>');}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment