Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

get-selection-range

Canner2.5kMIT0.1.0

Get cursor's selection range.

readme

get-selection-range NPM version Dependency Status

Get cursor's selection range.

Installation

$ npm install --save get-selection-range

Usage

var getSelectionRange = require('get-selection-range');

// get visible selection range
getSelectionRange.getVisibleSelectionRect();

// get collpase selection range
getSelectionRange.getCollapsedClientRect()

License

MIT © chilijung