Attaching event listeners to the content editable field to update the original element