// input is the TextArea object
input.focus();
var oSel=document.selection;
if (oSel && oSel.createRange){
oSel.createRange().duplicate().text = insText;
}
for Gecko base:
var len = input.selectionEnd;
input.value = input.value.substr( 0, len ) + insText + input.value.substr(len);
input.setSelectionRange(len+insText.length,len+insText.length);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment