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