I have a caret in the textarea (no selection). I need to make selection out of it.
For example: "This is a te|xt"
var caret = document.selection.createRange (); // got empty range between "e" and "x"
caret.moveEnd('character'); // Move endpoint one character right, now it must be "x"
alert (caret.text); // empty !!!
What is wrong?