trafficinc / highlightngrab

Highlight n Grab / Link Highlighter is a JS Library that will highlight text and can extract the text for manipulation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Link Highlighter

Will highlight selected text in DOM element, say "p"/paragraph element and allow to select the text, then grab it to store it or manipulate it further.

See index.html for implementation

This is experimental

Options

el can be element: example "p" for paragraph, and class or id.

LinkHighlighter.init({
  el: "#myp",
  saveBtn : "#saveBtn",
  lhWatch: function(event) {
  // watch for new highlighted areas event
  console.log(event);
 },
  lhValue:function(value) {
  // highlighted area value
  //console.log(value);
 }
});

What it looks like: Alt text

About

Highlight n Grab / Link Highlighter is a JS Library that will highlight text and can extract the text for manipulation.


Languages

Language:JavaScript 78.7%Language:HTML 21.3%