Answers for "how to trigger a textchange method in contenteditable div"

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 trigger a textchange method in contenteditable div"

Browse Popular Code Answers by Language