Div Onchange Angular Div
You can use the input event, like so:
...
<div contenteditable (input)="onNameChange($event.target.innerHTML)">
Type your name
</div>
GutoTrosla
You can use the input event, like so:
...
<div contenteditable (input)="onNameChange($event.target.innerHTML)">
Type your name
</div>
<!-- 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>
<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>