Highlight Text

<sw-highlight-text>

ready
This component highlights text based on the searchTerm using regex

Usage

Loading...
<sw-highlight-text text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr" searchTerm="sit"></sw-highlight-text>

Component properties

Property name Type Default
searchTerm String
text String

Methods

Method name Parameters
searchAndReplace No parameters
escapeRegExp string

Imports

  • ./sw-highlight-text.scss