TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Use your browser as Notepad

105 pointsby fizerkhanalmost 12 years ago

12 comments

thinkxlalmost 12 years ago
Sublime Text Flavor with Ace<p><pre><code> data:text&#x2F;html,&lt;title&gt;DoJS&lt;&#x2F;title&gt;&lt;style type=&quot;text&#x2F;css&quot;&gt;#e{font-size: 16px; position:absolute;top:0;right:0;bottom:0;left:0;}&lt;&#x2F;style&gt;&lt;div id=&quot;e&quot;&gt;&lt;&#x2F;div&gt;&lt;script src=&quot;http:&#x2F;&#x2F;d1n0x3qji82z53.cloudfront.net&#x2F;src-min-noconflict&#x2F;ace.js&quot; type=&quot;text&#x2F;javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;&#x2F;script&gt;&lt;script&gt;var e=ace.edit(&quot;e&quot;);e.setTheme(&quot;ace&#x2F;theme&#x2F;monokai&quot;);e.getSession().setMode(&quot;ace&#x2F;mode&#x2F;javascript&quot;);&lt;&#x2F;script&gt;</code></pre>
评论 #6005682 未加载
评论 #6005614 未加载
评论 #6005651 未加载
oddthinkalmost 12 years ago
Or, you know, you could just use Notepad as Notepad. Or a real text editor, or something like Simplenote.<p>Snark aside, this would be a more interesting post if the author gave some reason why this was a good idea. As far as I can tell, it&#x27;s strictly worse than a text editor. I mean, it is an interesting hack, but the post doesn&#x27;t frame it at all.
评论 #6007256 未加载
评论 #6006995 未加载
vladocaralmost 12 years ago
Actually you can do much more with this trick, I made one free tool called Writability - <a href="http://www.vcarrer.com/2013/01/writability-write-in-your-browser.html" rel="nofollow">http:&#x2F;&#x2F;www.vcarrer.com&#x2F;2013&#x2F;01&#x2F;writability-write-in-your-bro...</a>
gitaarikalmost 12 years ago
You can also just use a textarea:<p><pre><code> data:text&#x2F;html,&lt;textarea&gt; </code></pre> A more polished version (100% width&#x2F;height, nice margin&#x2F;padding, auto focus):<p><pre><code> data:text&#x2F;html,&lt;html&gt;&lt;head&gt;&lt;title&gt;Notepad&lt;&#x2F;title&gt;&lt;style&gt;html,body{margin:0;padding:0;}textarea{padding:10px;font-family:Courier;font-size:16px;height:100%;width:100%;border:none;outline:none;}&lt;&#x2F;style&gt;&lt;&#x2F;head&gt;&lt;body&gt;&lt;textarea%20style=&quot;height:100%;width:100%;font-size:16px;padding:10px;&quot;&gt;&lt;&#x2F;textarea&gt;&lt;script&gt;document.getElementsByTagName(&#x27;textarea&#x27;)[0].focus()&lt;&#x2F;script&gt;&lt;&#x2F;body&gt;&lt;&#x2F;html&gt; </code></pre> This fixes the issue that cutting (Cmd&#x2F;Ctr + x) doesn&#x27;t work in Firefox with contenteditable.
评论 #6007065 未加载
tgkokkalmost 12 years ago
Ace with Vim keybindings:<p><pre><code> data:text&#x2F;html,&lt;title&gt;DoJS&lt;&#x2F;title&gt;&lt;style type=&quot;text&#x2F;css&quot;&gt;#e{font-size: 16px; position:absolute;top:0;right:0;bottom:0;left:0;}&lt;&#x2F;style&gt;&lt;div id=&quot;e&quot;&gt;&lt;&#x2F;div&gt;&lt;script src=&quot;https:&#x2F;&#x2F;rawgithub.com&#x2F;ajaxorg&#x2F;ace-builds&#x2F;master&#x2F;src-min-noconflict&#x2F;ace.js&quot; type=&quot;text&#x2F;javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;&#x2F;script&gt;&lt;script src=&quot;https:&#x2F;&#x2F;rawgithub.com&#x2F;ajaxorg&#x2F;ace-builds&#x2F;master&#x2F;src-min-noconflict&#x2F;keybinding-vim.js&quot; type=&quot;text&#x2F;javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;&#x2F;script&gt;&lt;script&gt;var e=ace.edit(&quot;e&quot;);e.setTheme(&quot;ace&#x2F;theme&#x2F;monokai&quot;);e.setKeyboardHandler(ace.require(&quot;ace&#x2F;keyboard&#x2F;vim&quot;).handler);e.getSession().setMode(&quot;ace&#x2F;mode&#x2F;javascript&quot;);&lt;&#x2F;script&gt; </code></pre> Base64 (works in Firefox):<p><pre><code> data:text&#x2F;html;base64,PHRpdGxlPkRvSlM8L3RpdGxlPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+I2V7Zm9udC1zaXplOiAxNnB4OyBwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtyaWdodDowO2JvdHRvbTowO2xlZnQ6MDt9PC9zdHlsZT48ZGl2IGlkPSJlIj48L2Rpdj48c2NyaXB0IHNyYz0iaHR0cHM6Ly9yYXdnaXRodWIuY29tL2FqYXhvcmcvYWNlLWJ1aWxkcy9tYXN0ZXIvc3JjLW1pbi1ub2NvbmZsaWN0L2FjZS5qcyIgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBjaGFyc2V0PSJ1dGYtOCI+PC9zY3JpcHQ+PHNjcmlwdCBzcmM9Imh0dHBzOi8vcmF3Z2l0aHViLmNvbS9hamF4b3JnL2FjZS1idWlsZHMvbWFzdGVyL3NyYy1taW4tbm9jb25mbGljdC9rZXliaW5kaW5nLXZpbS5qcyIgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBjaGFyc2V0PSJ1dGYtOCI+PC9zY3JpcHQ+PHNjcmlwdD52YXIgZT1hY2UuZWRpdCgiZSIpO2Uuc2V0VGhlbWUoImFjZS90aGVtZS9tb25va2FpIik7ZS5zZXRLZXlib2FyZEhhbmRsZXIoYWNlLnJlcXVpcmUoImFjZS9rZXlib2FyZC92aW0iKS5oYW5kbGVyKTtlLmdldFNlc3Npb24oKS5zZXRNb2RlKCJhY2UvbW9kZS9qYXZhc2NyaXB0Iik7PC9zY3JpcHQ+ </code></pre> Ace with Emacs keybindings:<p><pre><code> data:text&#x2F;html,&lt;title&gt;DoJS&lt;&#x2F;title&gt;&lt;style type=&quot;text&#x2F;css&quot;&gt;#e{font-size: 16px; position:absolute;top:0;right:0;bottom:0;left:0;}&lt;&#x2F;style&gt;&lt;div id=&quot;e&quot;&gt;&lt;&#x2F;div&gt;&lt;script src=&quot;https:&#x2F;&#x2F;rawgithub.com&#x2F;ajaxorg&#x2F;ace-builds&#x2F;master&#x2F;src-min-noconflict&#x2F;ace.js&quot; type=&quot;text&#x2F;javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;&#x2F;script&gt;&lt;script src=&quot;https:&#x2F;&#x2F;rawgithub.com&#x2F;ajaxorg&#x2F;ace-builds&#x2F;master&#x2F;src-min-noconflict&#x2F;keybinding-emacs.js&quot; type=&quot;text&#x2F;javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;&#x2F;script&gt;&lt;script&gt;var e=ace.edit(&quot;e&quot;);e.setTheme(&quot;ace&#x2F;theme&#x2F;monokai&quot;);e.setKeyboardHandler(ace.require(&quot;ace&#x2F;keyboard&#x2F;emacs&quot;).handler);e.getSession().setMode(&quot;ace&#x2F;mode&#x2F;javascript&quot;);&lt;&#x2F;script&gt; </code></pre> Base64 (works in Firefox):<p><pre><code> data:text&#x2F;html;base64,PHRpdGxlPkRvSlM8L3RpdGxlPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+I2V7Zm9udC1zaXplOiAxNnB4OyBwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtyaWdodDowO2JvdHRvbTowO2xlZnQ6MDt9PC9zdHlsZT48ZGl2IGlkPSJlIj48L2Rpdj48c2NyaXB0IHNyYz0iaHR0cHM6Ly9yYXdnaXRodWIuY29tL2FqYXhvcmcvYWNlLWJ1aWxkcy9tYXN0ZXIvc3JjLW1pbi1ub2NvbmZsaWN0L2FjZS5qcyIgdHlwZT0idGV4dC9qYXZhc2NyaXB0IiBjaGFyc2V0PSJ1dGYtOCI+PC9zY3JpcHQ+PHNjcmlwdCBzcmM9Imh0dHBzOi8vcmF3Z2l0aHViLmNvbS9hamF4b3JnL2FjZS1idWlsZHMvbWFzdGVyL3NyYy1taW4tbm9jb25mbGljdC9rZXliaW5kaW5nLWVtYWNzLmpzIiB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIGNoYXJzZXQ9InV0Zi04Ij48L3NjcmlwdD48c2NyaXB0PnZhciBlPWFjZS5lZGl0KCJlIik7ZS5zZXRUaGVtZSgiYWNlL3RoZW1lL21vbm9rYWkiKTtlLnNldEtleWJvYXJkSGFuZGxlcihhY2UucmVxdWlyZSgiYWNlL2tleWJvYXJkL2VtYWNzIikuaGFuZGxlcik7ZS5nZXRTZXNzaW9uKCkuc2V0TW9kZSgiYWNlL21vZGUvamF2YXNjcmlwdCIpOzwvc2NyaXB0Pg== </code></pre> EDIT: formatting<p>EDIT 2: Base64
评论 #6006988 未加载
bichiliadalmost 12 years ago
If you want to get fancy, add a little bit of style. It goes a long way.<p><pre><code> data:text&#x2F;html, &lt;html contenteditable&gt;&lt;style&gt;body {color: #333; width: 960px; margin: 0 auto; display: block; height: 100%; font-size: 36px; padding: 20px;}&lt;&#x2F;style&gt;&lt;&#x2F;html&gt;</code></pre>
评论 #6005565 未加载
评论 #6005646 未加载
eruditelyalmost 12 years ago
Now all I need to do is memorize this string when I&#x27;m on the phone trying to write down a phone number!
评论 #6005826 未加载
评论 #6005667 未加载
weaviealmost 12 years ago
Now all it needs are Vim keybindings.
lifeisstillgoodalmost 12 years ago
Oh, man this is amazing.<p>Ever since I first saw the aloha text editor I realised content-editable is going to have a massive impact - this was one that is totally obvious in hindsight but has completely floored me.<p>And it works in my iphone. Cannot actually <i>save</i> but still its nice to know.
jdkananialmost 12 years ago
Ultimate Ace notepad:<p><a href="https://gist.github.com/jdkanani/4670615" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;jdkanani&#x2F;4670615</a>
JCordeiroalmost 12 years ago
I really like the design of this site.
评论 #6006984 未加载
luxiferalmost 12 years ago
Awesome !!