An Offline Text Editor for Chrome in One-Line of Code ===================================================== By George Mandis https://george.mand.is/2017/01/an-offline-text-editor-for-chrome-in-one-line-of-code Sunday, January 8th 2017 ![One-line Editor](https://s3-us-west-2.amazonaws.com/george.mand.is/featured/one-line-code-editor.jpg) I've been researching web-based code editors this evening for a web development and programming class I'll be teaching to kids. There are lots of good options, but nothing quite perfect yet. I'm actually very fond of the editor [Khan Academy](https://www.khanacademy.org) is using, but I'll write up a comparison of those findings another time. What I *did* stumble across is a fun trick you can use in Chrome, Firefox and Safari to make an instant text editor in your browser! [This post on Lifehacker](http://lifehacker.com/5980134/turn-any-browser-window-into-a-quick-edit-notepad) is three years old, but I just stumbled across it. All you have to do is type the following into your browser: `data:text/html, ` That's it! Suddenly you have an editable web page. In Chrome you can even use keyboard shortcuts to make text bold or italicized. If you hit Command or Control S you can save it to your computer. It's also simple to bookmark and works offline. If you want it to feel a little bit more like a minimal text editor try this: `data:text/html,` Or maybe you're on a Mac and want it to use [San Francisco](https://developer.apple.com/fonts/): `data:text/html,` This even works on iOS! However, saving your notes may prove to be a little difficult. Most the share tools I experimented with only sent the URL off to those other apps. That will be something to experiment with later. Kind of fun! Follow this link to give it a try.