source: node_modules/toggle-selection/README.md

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 547 bytes
RevLine 
[d24f17c]1# Toggle Selection
2
3Simple module exposing function that deselects current browser selection and returns function that restores selection.
4
5```
6var deselect = require('toggle-selection');
7var reselect = deselect(); // remove all selection
8// …
9// do something with current selection, text, etc;
10// …
11reselect(); // restore selection
12```
13
14All credits go to [@shvaikalesh](https://github.com/shvaikalesh).
15
16# [Example](https://github.com/sudodoki/toggle-selection/blob/master/example)
17
18![example recording](http://g.recordit.co/YPu6mHvcKe.gif)
Note: See TracBrowser for help on using the repository browser.