Answers for "html contenteditable on change"

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

Browse Popular Code Answers by Language