keyword-mark-element
v0.2.0
Published
Simple web component to mark keywords in a string
Downloads
552
Readme
<keyword-mark>
A simple web component to mark keywords in a string.
Usage
Install:
$ npm i -S keyword-mark-element
Include:
<script src="node_modules/keyword-mark-element/lib/keyword-mark.js"></script>
Or in JavaScript:
import "./node_modules/keyword-mark-element/lib/keyword-mark.js";
Use:
<keyword-mark keywords="foo">foo bar baz</keyword-mark>
Essentially, any keywords specified in the keywords
attribute will be
highlighted in the text content of the element.
License
MIT