1<!-- Use an "input" event listener -->
2<div contenteditable="true" id="editor">Please type something in here</div>
3<script>
4 document.getElementById("editor").addEventListener("input", inputEvt => {
5 console.log("input event fired");
6 }, false);
7</script>