So I have a method that takes a tag and wraps the selected text in that tag.
function wrap(tag) { var sel, range; if (window.getSelectio
do this after inserting the node to the range range.collapse(false); this will change position of selection range to the end of the range, so my guess is it should set the cursor at end position
range.collapse(false);