Skip to content

kadirahq/meteor-string-highlighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meteor-string-highlighter

String Highlighter for Meteor Apps

Install

meteor install kadira:kadira:string-highlighter

Usage

Inject <highlight> tags directly into DOM at the client-side

var elements = ["#elm1_Id", ".elm2_Class"];
var keywords = ["keyword1", "keyword2"];
StringHighlighter._wrapInTag(element, keywords);

Replace with <highlight> tag before the html loads into document

var html = StringHighlighter._replaceWithHighlightTag(html, keyword);

In case, you wants to remove the <highlight> tags;

var html = StringHighlighter._removeHighlightTags(html);

About

String Highlighter for Meteor Apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages