-
Notifications
You must be signed in to change notification settings - Fork 160
IgxTextHighlight Directive
Dimitar Davidkov edited this page Apr 16, 2018
·
6 revisions
IgxTextHighlightDirective
provides a way to highlight text elements.
<div [igxTextHighlight]="highlightClass">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
- As a developer I want to be able to highlight parts of the text in a certain element.
- As a developer I want to be able to customize how the highlight looks like.
- As an end user I would like to be able to highlight part of the application, so certain text elements stand out from the rest of the text.
The highlight directive will be used to highlight searched strings in the IgxGridComponent.
Name | Type | Description |
---|---|---|
className | string | Determines the CSS class of the highlight elements, allowing the developer to provide custom CSS to customize the highlight. |
Name | Type | Arguments | Description |
---|---|---|---|
highlight | number | The text that should be highlighted and, optionally, if the search should be case sensitive or not (it defaults to false if it isn't specified). | Clears the existing highlight and highlight the searched text. Returns how many times the element contains the searched text. |
clearHighlight | void | N/A | Clears any existing highlight |