1.1.4 • Published 8 years ago

get-input-selection v1.1.4

Weekly downloads
4,207
License
ISC
Repository
github
Last release
8 years ago

get-input-selection

getInputSelection() provides carrot position for textarea. Works as selectionBegin and selectionEnd for all browsers

props go to http://stackoverflow.com/questions/235411/is-there-an-internet-explorer-approved-substitute-for-selectionstart-and-selecti

usage

const { begin, end } = getInputSelection(textarea);