What's new

Closed Simple Notepad using code into your browsers URL bar.

Status
Not open for further replies.

DetroitGuru

Forum Veteran
Joined
Oct 1, 2017
Posts
1,859
Reaction
3,114
Points
838
559724

Welcome to BLACK|ARMY thread!

I'm going to share you about this

Notepads are awesome, but sometimes you need to just jot down a quick one or two line note that doesn't need to be saved. Software developer Jose Jesus Perez Aguinaga shares a simple way to do it in any browser.

All you need to do is type the following code into the browser's URL bar:

Original Script
Code:
data:text/html, <html contenteditable>

Hit Enter, and start typing away directly in your browser window. The reason this works is that it uses the Data URI scheme to make a simple HTML page with the element, "contenteditable." If you decide you want to save it, you can do so in your browser and it will save as an HTML file. Otherwise, it's a fantastic little place to dump ideas that pop into your head that you don't need saved in an actual notepad. Of course, you don't have to remember the little line of code, you can enter it into your text expander for easy access, or just make it a bookmark. Head over to Aguinaga's site below and dig through the comments for a bunch of modifiers to the code to change the background, text size, and more.

Editor with little bit styles by You do not have permission to view the full content of this post. Log in or register now.
Code:
data:text/html, <html contenteditable><style>body {color: #333; width: 960px; margin: 0 auto; display: block; height: 100%; font-size: 36px; padding: 20px;}</style></html>

Theme that changes the background color as you type by You do not have permission to view the full content of this post. Log in or register now.
Code:
data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">

Sublime Text Flavor with Ace by You do not have permission to view the full content of this post. Log in or register now.
Code:
data:text/html,<title>DoJS</title><style type="text/css">#e{font-size: 16px; position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");</script>

If you want to save your content, do the usual browser save(CMD+S for OSX). It will save your content as html file. You can also bookmark above data url to make it easier.

"We make a LIVING by what we GET; We make a LIFE by what we MAKE" -Sip Winston Chupchill
#MakeStuffHappen

Copyright © 2019, fizherkhan.com; lifehäçker.com. All Rights Reserved.
559736
 

Attachments

Last edited:
Status
Not open for further replies.

Similar threads

Back
Top