Save & restore selections in a document, using <mark>
elements
Download node at nodejs.org and install it, if you haven't already.
npm install save-selection --save
import {save, restore} from 'save-selection';
// will save selections in <mark> elements
// with classes "selection-start" & "selection-end"
save(document.querySelector('#main'));
// will restore selections,
// setting start to a <mark> element with class selection-start
// and end with class selection-end
restore(document.querySelector('#main'));
npm install
npm test
- get-selection-range-from-elm: window.getSelection().rangeAt(0) but only if it exists & is within an element
- 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
MIT
Generated by package-json-to-readme