Update doc (#8085)

This commit is contained in:
Eugenio Romano
2023-01-02 15:00:01 +01:00
committed by GitHub
parent 093b1e8a67
commit 00dfd7c5d9
158 changed files with 758 additions and 928 deletions

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-11-13
---
# [Highlight Transform service](lib/core/src/lib/services/highlight-transform.service.ts "Defined in highlight-transform.service.ts")
# [Highlight Transform service](../../../lib/core/src/lib/services/highlight-transform.service.ts "Defined in highlight-transform.service.ts")
Adds HTML to a string to highlight chosen sections.
@@ -13,12 +13,12 @@ Adds HTML to a string to highlight chosen sections.
### Methods
- **highlight**(text: `string`, search: `string`, wrapperClass: `string` = `"adf-highlight"`): [`HighlightTransformResult`](lib/core/src/lib/services/highlight-transform.service.ts)<br/>
- **highlight**(text: `string`, search: `string`, wrapperClass: `string` = `"adf-highlight"`): [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts)<br/>
Searches for `search` string(s) within `text` and highlights all occurrences.
- _text:_ `string` - Text to search within
- _search:_ `string` - Text pattern to search for
- _wrapperClass:_ `string` - CSS class used to provide highlighting style
- **Returns** [`HighlightTransformResult`](lib/core/src/lib/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
- **Returns** [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
## Details
@@ -33,7 +33,7 @@ highlight any of those words individually. The &lt;span> element includes a
`class` attribute which defaults to "highlight" but you can pass any class name
you like using the `wrapperClass` parameter.
The resulting text with HTML highlighting is returned within a [`HighlightTransformResult`](lib/core/src/lib/services/highlight-transform.service.ts)
The resulting text with HTML highlighting is returned within a [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts)
object:
```ts