I have a div tag that is contenteditable so that users can type in the div. There is a function that adds a link into the div when the user presses a button. I would like the caret to be positioned after the link so that users can continue to type. The link can be inserted many times.
I require this code to work in: IE, Firefox, Opera, Safari and Chrome.Code:<div id="mydiv" contenteditable="true" tabindex="-1">before <a href="#">link</a> after</div>
Can anyone offer any help?