I'd like to know how to move the cursor position to the end of my text wrapped by a "contenteditable" DIV...
My code below selects all my text in the DIV element... But I just would like to add the cursor at the end of the text without selecting all the text...
My .js code:
$mydiv.wrapInner('<div contenteditable="true" id="editableCase"></div>');
var range = document.createRange();
range.selectNodeContents(document.getElementById("editableCase"));
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
_case.$element.children().children().focus();