TextHighlighter allows you to highlight text on web pages.
JavaScript HTML CSS
Latest commit ee28889 Apr 3, 2016 @mir3z disclaimer
Permalink
Failed to load latest commit information.
build build & doc Dec 24, 2014
demos cleanup Dec 25, 2014
doc updated bower package name Dec 25, 2014
lib cleanup Dec 25, 2014
src cleanup Dec 25, 2014
test release preparations Dec 24, 2014
.gitignore Merge branch 'master' into gh-pages Dec 25, 2014
.jshintrc comments in spec files Nov 19, 2014
LICENSE refactor Nov 19, 2014
README.md disclaimer Apr 3, 2016
bower.json added bower.json Dec 25, 2014
gruntfile.js release preparations Dec 24, 2014
hlbg.png release preparations Dec 24, 2014
index.html updated bower package name Dec 25, 2014
jsdoc.conf.json jsdoc & refactorization Nov 30, 2014
package.json release preparations Dec 24, 2014

README.md

This repository is no longer maintained!

TextHighlighter

TextHighlighter allows you to highlight text on web pages. Just select it!

Getting started

Download TextHighlighter directly from GitHub or install with Bower:

$ bower install text-highlighter

Add script file to head section of your web page:

<script type="text/javascript" src="TextHighlighter.min.js"></script>

And use it!

var hltr = new TextHighlighter(document.body);

For more details see API reference or Wiki pages on GitHub.

Also check Demos section below for examples of usage.

Features

  • Highlighting of selected text.
  • Highlighting all occurrences of given text (find & highlight).
  • Removing highlights.
  • Selecting highlight color.
  • Serialization & deserialization.
  • Works well in iframes.
  • Keeps DOM clean.
  • No dependencies. No jQuery or other libraries needed.

Compatibility

Should work in all decent browsers and IE >= 9.

Demos

Documentation

You may check API reference or Wiki pages on GitHub.