Inserting a character into text field

Link : rangyinputs-jquery-src.js  to the html page. (I am not the author.)

Download link : https://github.com/timdown/rangyinputs (I don’t own this account.)

To insert, use the following command:

$(“#inputTextBox”).insertText(a, caretPosition , “collapseToEnd”);

a –> to contain the character to be inserted

caretPosition –> position at which the character has to be inserted.

collapseToEnd –> cursor to be placed at the end of inserted text

Leave a comment