Simple editor
HTML
<textarea id="editor" onkeyup="sendCode(event)"></textarea>
<div id="output"></div>
CSS
#output {
width:200px;
height:200px;
background:yellow;
}
JavaScript
var editor = document.getElementById("editor");
var output = document.getElementById("output");
editor.value = "Type here!"
function sendCode(event){
output.innerHTML = editor.value;
}