<div contentEditable='true' onInput={e => console.log('Text inside div', e.currentTarget.textContent)} > Text inside div </div>