JSFiddle - React, Tailwind, and code Playground
HTML
<div id="editor" contenteditable='true'>
If user types in this area it should fire an event if the end of line reached while typing i.e. when cursor switches the line.
<br/><br/>
Also an event should fire when cursor has reached end of the div. i.e. when content overflows the div.
</div>