get-input-selection
v1.1.4
Published
getInputSelection() provides carrot position for textarea. Works as selectionBegin and selectionEnd for all browsers
Downloads
43,253
Readme
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);