mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Update doc (#8085)
This commit is contained in:
@@ -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 <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
|
||||
|
Reference in New Issue
Block a user