0.0.9 • Published 8 years ago

accent v0.0.9

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

accent

A simple library for serializable highlights.

import Accent from 'accent';

const accent = new Accent();

accent.highlightCurrentSelection()
  .then(highlight => {
    highlight.scrollIntoView();
  }).catch(err => {
    console.log('Oh no!');
  });

/* or */

accent.highlightFromString('Hello, world!')
  .then(highlight => {
    highlight.scrollIntoView();
  }).catch(err => {
    console.log('Oh no!');
  });

Installation

npm install accent --save

Usage

Bundle with browserify if you're building a project with node.

Or, if making a static website, paste this line of HTML into your code:

<script src="https://www.brcdn.org/accent/latest/?standalone=Accent"></script>

Accent will be available in the global scope.

License

MIT

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.0

8 years ago

0.0.0-0

8 years ago

0.1.0-0

8 years ago

0.0.1-0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago