contentEditable javascript caret placement in div
- by Ben Mc
I have a contentEditable div.
Let's say the user clicks a button that inserts HTML into the editable area.
So, they click a button and the following is added to the innerHTML of the contentEditable div:
<div id="outside"><div id="inside"></div></div>
How do I automatically place the cursor (ie caret) IN the "inside"…