Answers for "how to add onchange event in div contenteditable"

3

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>
Posted by: Guest on October-14-2020

Code answers related to "how to add onchange event in div contenteditable"

Browse Popular Code Answers by Language