0
yogi posted
How to get selected text of Textarea in JavaScript ?
How to get selected text of Textarea in JavaScript ?
<textarea id="editor">Hi , how to get selected Text of textarea(html) in JavaScript ?</textarea>
suppose i select "Text of textarea(html) " in textarea than it should be give result that selected text in JavaScript or jQuery
var selectedText=document.getElementById("editor").getSelectedText();
is there any getSelectedText() function in JavaScript or jQuery , which return me only selected text , not whole text of textarea ?