update doc (#8386)

This commit is contained in:
Eugenio Romano
2023-03-17 16:21:38 +01:00
committed by GitHub
parent 1b2575b2db
commit 96a04588b3
80 changed files with 8108 additions and 436 deletions

View File

@@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2018-11-13
---
# [Highlight Transform service](lib/core/src/lib/common/services/highlight-transform.service.ts "Defined in highlight-transform.service.ts")
# [Highlight Transform service](../../../lib/core/src/lib/common/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/common/services/highlight-transform.service.ts)<br/>
- **highlight**(text: `string`, search: `string`, wrapperClass: `string` = `"adf-highlight"`): [`HighlightTransformResult`](../../../lib/core/src/lib/common/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/common/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
- **Returns** [`HighlightTransformResult`](../../../lib/core/src/lib/common/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/common/services/highlight-transform.service.ts)
The resulting text with HTML highlighting is returned within a [`HighlightTransformResult`](../../../lib/core/src/lib/common/services/highlight-transform.service.ts)
object:
```ts