I\'m working on a jQuery plugin that will allow you to do @username style tags, like Facebook does in their status update input box.
My problem is, that
You could use my Rangy library, which attempts with some success to normalize browser range and selection implementations. If you've managed to insert the as you say and you've got it in a variable called aElement, you can do the following:
var range = rangy.createRange();
range.setStartAfter(aElement);
range.collapse(true);
var sel = rangy.getSelection();
sel.removeAllRanges();
sel.addRange(range);