how to apply javascript to selected text of a textarea?
I want to apply some changes to the selected text of a text area only.
I want to select a certain portion 开发者_如何学Cof a text written in the text area and want to make some changes on it by javascript.
Thanks
document.selection.createRange().text = "NEW TEXT";
I think the answer to this question might help you:
how-to-get-selected-text-from-textbox
It shows you selection of the text and you can use javascript to process it.
精彩评论