source: imaps-frontend/node_modules/toggle-selection/README.md

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 547 bytes
Line 
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.