notes/Very Basic Note Pad Document Editor Word Processor-qEWRJ7m0.html
<html>
<head>
<title>Basic Note Pad</title>
<script>
function format(cmd)
{
document.execCommand(cmd, false);
}
</script>
</head
<body>
<div id="controls">
<button onclick="format('bold')">Bold</button>
<button onclick="format('italic')">Italic</button>
<button onclick="format('underline')">Underline</button>
<button onclick="format('indent')">Indent</button>
<button onclick="format('outdent')">Unindent</button>
<button onclick="format('undo')">Undo</button>
<button onclick="format('redo')">Redo</button>
</div>
<h1 id="docTitle" contentEditable="true">My Document</h1>
<hr>
<div id="myDoc" contentEditable="true" spellcheck="true">
Create your doc here!
</div>
</body>
</html>
<!--More complete example at
https://developer.mozilla.org/en-US/docs/Rich-Text_Editing_in_Mozilla#Executing_Commands
-->
syntax highlighted by Code2HTML, v. 0.9.1