Sabías que tu navegador se podría convertir en un bloc de notas con un simple comando en el ingreso de la URL:
copia y lo pega en el ingreso de la URL del navegador
data:text/html, <html contenteditable>
Aquí otro tip para tener el bloc de notas tipo “Linea de Comando” DOS.
copia todo el contenido y lo pegas en el ingreso de la URL del navegador
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, | |
<body id='b'> | |
<textarea spellcheck="false" id="t"></textarea> | |
<script> | |
var f, | |
t = document.getElementById("t"), | |
b = document.body, | |
v = t.value, | |
c = parseInt(b.getAttribute("c")) || t.value.length, | |
s = parseInt(b.getAttribute("s")) || 0; | |
t.focus(); | |
document.title = t.value.split("\n")[0] || "..."; | |
t.className = "s"; | |
t.scrollTop = s; | |
function updateUrl() { | |
clearInterval(f); | |
f = setTimeout(function() { | |
if (v === t.value) { return false; } | |
t.className = ""; | |
t.innerHTML = encodeURIComponent(t.value); | |
var s = "data:text/html,<body id='b'"; | |
if (!!t.selectionStart) { s += " c='" + t.selectionStart + "'"; } | |
s += " s='" + t.scrollTop + "'>" + b.innerHTML; | |
window.location.href = s; | |
}, 500); | |
} | |
t.addEventListener("keyup", updateUrl); | |
if (!!t.setSelectionRange) { | |
t.setSelectionRange(c,c); | |
setTimeout(function(){ | |
t.setSelectionRange(c,c); | |
t.scrollTop = s; | |
}, 10); | |
} | |
</script> | |
<style> | |
textarea { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
overflow: auto; | |
margin: 0; | |
padding: 10px; | |
background: black; | |
font: 14px/20px monospace; | |
outline: none; | |
border: none; | |
box-sizing: border-box; | |
cursor: wait; | |
color: gray; | |
} | |
textarea.s { | |
cursor: text; | |
color: white; | |
} | |
</style> | |
<!-- http://iamnotagoodartist.com/web/an-auto-updating-data-uri-text-editor --> |
Al terminar de escribir podrás guardarlo en formato htm.
Nota: Funciona en todos los navegadores menos en Internet Explorer.
Vía: iamnotagoodartist
Deja una respuesta