I'm wondering how I can capture the recently inserted value of a contenteditable. I have
<section id="content" contenteditable="true">
</section>
<script>
function parse(e) {
console.log(e);
}
var el = document.getElementById("content");
el.addEventListener("input", parse, false);
</script>
It seems as though the event doesn't carry any information regarding what content was just inserted. Is there another "out-of-the-box" method that could capture this? I'm not very familiar with mutation events, but is that perhaps my best shot?
Well, this may be a poor-mans solution, but hooking it up with a keypress event listener gave me the keycode for the recently pressed key
Just a matter of mapping keycodes to values to get there.