You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Component,h,Host}from'@stencil/core';import'markster';
@Component({tag: 'my-component'})exportclassMyComponent{render(){return<Host><mark-stertext={'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porta eros nibh, a iaculis nisl congue vitae.'}searchWords={'ipsum iaculis elit'}/></Host>;}}
HTML
<scriptsrc='https://unpkg.com/markster@latest/dist/markster.js'></script><mark-stertext="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porta eros nibh, a iaculis nisl congue vitae."
search-words="ipsum iaculis elit"></mark-ster>
Using this component
Script tag
Put a script tag similar to this <script src="https://unpkg.com/markster@latest/dist/markster.js"></script> in the head of your index.html
Then you can use the element anywhere in your template, JSX, html etc
In a stencil project
Run npm install markster --save
Add an import to the npm package import 'markster';
Then you can use the element anywhere in your stencil project.