save-selection
Save & restore selections in a document, using <mark>
elements
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install save-selection --save
Usage
; // will save selections in <mark> elements// with classes "selection-start" & "selection-end"; // will restore selections,// setting start to a <mark> element with class selection-start// and end with class selection-end;
Tests
npm installnpm test
Dependencies
- get-selection-range-from-elm: window.getSelection().rangeAt(0) but only if it exists & is within an element
Dev Dependencies
- babel-cli: Babel command line.
- babel-core: Babel compiler core.
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babelify: Babel browserify transform
- browserify: browser-side require() the node way
- electron-prebuilt: Install electron prebuilt binaries for the command-line use using npm
- package-json-to-readme: Generate a README.md from package.json contents
- semistandard: All the goodness of
feross/standard
with semicolons sprinkled on top. - snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
- tape: tap-producing test harness for node and browsers
- testron: CI your client side tests with Electron
License
MIT
Generated by package-json-to-readme