by Paul Arnote (parnote)
Let's see a show of hands: how many of you have been browsing the web and wanted to jot down a few notes as you went? Well, if you're using a modern HTML5 browser (Opera, Firefox, Chromium, etc.), you can have a handy place to jot those notes down – and it's only one tab over.
Thanks to a post by Jose Jesus Perez Aguinaga on the coderwall website, there is a simple one line command that will turn a tab in your HTML5 browser into a simple notepad. In that tab you can jot down those notes or thoughts that enter your head as you browse.
Here's the simple command:
data:text/html, <html contenteditable>
Simply copy and paste the command into the address bar of a new tab in your HTML5 web browser.
Bare and raw, here's what it looks like after I pasted the first stanza lyrics of the Beatles song "Let It Be" into it:
Pretty cool, huh?
Jose's post spurred others to chime in with their enhancements and ideas. Here's one version that only works in webkit HTML5 browsers (such as Chromium and Chrome):
This version uses a notebook paper background to display your text on. The code to produce it is as follows:
background: -webkit-linear-gradient(#f0f0f0, #fff);
font: normal 12px/1.5 "Lucida Grande", arial, sans-serif;
margin: 0 auto;
padding: 6px 5px 4px 42px;
border: 1px solid #d2d2d2;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px;
background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px;
-webkit-background-size: 100% 20px;
-moz-background-size: 100% 20px;
-ms-background-size: 100% 20px;
-o-background-size: 100% 20px;
background-size: 100% 20px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.07);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.07);
box-shadow: 0 1px 2px rgba(0,0,0,0.07);
border: 1px solid;
border-color: transparent #efe4e4;
<body contenteditable spellcheck="false" class="paper" >
Simply copy all of the above code, and paste it all into the address bar of a new tab in your favorite webkit HTML5 browser. As can be expected, the comments on Jose's post provide a whole host of variations on the "theme." Some variations only work on certain browsers.
One such item mixed among the comments was Jason Cooper's "a5" notepad.
One benefit to running the simple, original command in Firefox is that you can easily save your notes as an HTML file. Under Chromium and Chrome, there is no immediately available method to save your notes, other than copying them into another editor or printing them out. Under Firefox, simply select File > Save Page As... (or Ctrl + S from the keyboard), and provide an original name for your HTML file. The "default" filename is index.html, but I'm certain you can come up with a much more descriptive and useful name. Plus, it may quickly become confusing and difficult to find your notes when you have to search through a hundred different files, all named index.html.