JS/Mozilla: how can I get a selected text from textareaSorry for previous message.
Whit IE it's easy to get selected text from textarea: var Text = document.selection.createRange().text;
We can easily replace our selection: var Select = document.selection.createRange(); Select.text = "New text";
What code does produce the same result on Mozilla browser? |