html contenteditable on change code example
Example 1: contenteditable onchange
<!-- Use an "input" event listener -->
<div contenteditable="true" id="editor">Please type something in here</div>
<script>
document.getElementById("editor").addEventListener("input", inputEvt => {
console.log("input event fired");
}, false);
</script>
Example 2: contenteditable html
<blockquote contenteditable="true">
<p>Edit this content to add your own quote</p>
</blockquote>
<!-- blockquote can be change by other block element -->