get-input-selection

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
get-input-selection
1.1.47 years ago8 years agoMinified + gzip package size for get-input-selection in KB

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
import getInputSelection from 'get-input-selection';
const { begin, end } = getInputSelection(textarea);