I have a contenteditable div with span
elements inside.
<div contenteditable="true">
<span>one </span>
<span>two </span>
</div>
whenever I am adding any text beginning of the second span (beginning of two), it's adding to the end first span (after one).
How to place the cursor at beginning and add content