npm.io
1.1.4 • Published 10 years ago

get-input-selection

Licence
ISC
Version
1.1.4
Deps
0
Vulns
0
Weekly
0
Stars
3

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

import getInputSelection from 'get-input-selection';

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

Keywords