keyword-mark-element
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

<keyword-mark>

A simple web component to mark keywords in a string.

Demo

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

Package Sidebar

Install

npm i keyword-mark-element

Weekly Downloads

85

Version

0.2.0

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • 43081j