Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

onchange for contenteditable div

<div id="editor" contenteditable>
      Text inside div
</div>
<script type="text/javascript">
  document.getElementById("editor").addEventListener("input", 
  	(e) => console.log(e.currentTarget.textContent), false);
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #onchange #contenteditable #div
ADD COMMENT
Topic
Name
1+8 =