https://github.com/43081j/keyword-mark-element
Simple web component to mark keywords in a string
https://github.com/43081j/keyword-mark-element
highlight js mark webcomponents
Last synced: over 1 year ago
JSON representation
Simple web component to mark keywords in a string
- Host: GitHub
- URL: https://github.com/43081j/keyword-mark-element
- Owner: 43081j
- Created: 2019-08-05T20:24:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T04:13:44.000Z (over 3 years ago)
- Last Synced: 2025-03-10T18:01:53.661Z (over 1 year ago)
- Topics: highlight, js, mark, webcomponents
- Language: TypeScript
- Size: 629 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ``
A simple web component to mark keywords in a string.
[Demo](https://keyword-mark.glitch.me)
## Usage
Install:
```
$ npm i -S keyword-mark-element
```
Include:
```html
```
Or in JavaScript:
```ts
import "./node_modules/keyword-mark-element/lib/keyword-mark.js";
```
Use:
```html
foo bar baz
```
Essentially, any keywords specified in the `keywords` attribute will be
highlighted in the text content of the element.
## License
MIT