An open API service indexing awesome lists of open source software.

https://github.com/cannercms/get-selection-range

Get current cursor's selection range
https://github.com/cannercms/get-selection-range

Last synced: 10 months ago
JSON representation

Get current cursor's selection range

Awesome Lists containing this project

README

          

# get-selection-range [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url]
> Get cursor's selection range.

## Installation

```sh
$ npm install --save get-selection-range
```

## Usage

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

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

// get collpase selection range
getSelectionRange.getCollapsedClientRect()
```

## License

MIT © [chilijung]()

[npm-image]: https://badge.fury.io/js/get-selection-range.svg
[npm-url]: https://npmjs.org/package/get-selection-range
[travis-image]: https://travis-ci.org/Canner/get-selection-range.svg?branch=master
[travis-url]: https://travis-ci.org/Canner/get-selection-range
[daviddm-image]: https://david-dm.org/Canner/get-selection-range.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/Canner/get-selection-range