Last date modified: 2025-Jul-02

Interface: ITransientHighlightManagerApi

Remarks

Partial ITransientHighlightManager interface that defineds the highlighting API methods

Extended by

Methods

addHighlight()

addHighlight(setId, target, highlightConfig?): Promise<HighlightMemento>

Adds a highlight to the given Set

Parameters

setId: string

The SetID to add the highlight to

target: CellRangeMemento | RectRangeMemento | TextRangeMemento | TimeRangeMemento

Object representing the location where the highlight will be added

highlightConfig?: PartialHighlightConfig

Object that controls styling and behavior for highlights

Returns

Promise<HighlightMemento>


addHighlightTooltip()

addHighlightTooltip(setId, highlightId, text, icon?): TooltipMemento

Adds a hover tooltip to a given highlight

Parameters

setId: string

The set ID of the highlight where the tooltip will be added

highlightId: string

The highlight ID of the highlight where the tooltip will be added

text: string

Message to display in the tooltip

icon?: string

Name of the RWC icon to display in the tooltip

Returns

TooltipMemento


addTerm()

addTerm(setId, searchTerm, searchConfig?, termMetadata?): Promise<void>

Adds a search term to an existing term highlight set (created via the highlightTerm method above)

Parameters

setId: string

The SetID to add the term and highlights to

searchTerm: string

Term to search for and highlight

searchConfig?: PartialTextSearchConfig

Object that controls search behavior for the term

termMetadata?: UserDataMap

Object that will be included as a property on HighlightMemento objects passed to onadd event handlers (if any).

Returns

Promise<void>


addTermWithContext()

addTermWithContext(setId, searchTerm, context, searchConfig?, termMetadata?): Promise<void>

Adds a search term to an existing term highlight set (created via the highlightTerm method above)

Parameters

setId: string

The SetID to add the term and highlights to

searchTerm: string

Term to search for and highlight

context: string

The context which the searchTerm must be contained within. if the context does not contain the searchTerm, an exception will be thrown.

searchConfig?: PartialTextSearchConfig

DEPRECTATED: This parameter is no longer used by this method. It will be removed in a future version of the application. Object that controls search behavior for the term

termMetadata?: UserDataMap

Object that will be included as a property on HighlightMemento objects passed to onadd event handlers (if any).

Returns

Promise<void>


createSet()

createSet(highlightConfig?, setMetadata?): string

Creates a highlight set for location-based highlighting

Returns the SetID for future reference

Parameters

highlightConfig?: PartialHighlightConfig

Range highlight set config

setMetadata?: UserDataMap

Optional set metadata

Returns

string


deselectAllAnnotations()

deselectAllAnnotations(): void

Deselects all annotations

Returns

void


disableAutoHighlight()

disableAutoHighlight(): void

Turn off auto highlighting

Returns

void


doesSetExist()

doesSetExist(setId): boolean

Returns boolean to determine existence. True, if it exists. False, if it does not exist.

Parameters

setId: any

the SetID to check for existence

Returns

boolean


enableAutoHighlight()

enableAutoHighlight(setId, highlightConfig?): void

Enable highlighting based on user input for the set with the given id Auto highlighting will remain active until disableAutoHighlight is called

Parameters

setId: string

The SetID to add the highlights to

highlightConfig?: PartialHighlightConfig

Optional - theh highlight config to use

Returns

void


getSelectedAnnotations()

getSelectedAnnotations(): HighlightMemento[]

Returns the currently selected annotations

Returns

HighlightMemento[]

An array of the selected annotations represented as HighlightMementos


goToFirst()

goToFirst(setId): Promise<HighlightMemento>

Selects the first highlight in a given highlightSet

Parameters

setId: string

The SetID to remove the Highlight from

Returns

Promise<HighlightMemento>

the memento that was set to active


goToHighlight()

goToHighlight(setId, highlightId): Promise<void>

Selects a specified highlight based on SetId and HighlightId Same as , created to provide consistency with teh "goTo" naming

Parameters

setId: string

The SetID to remove the Highlight from

highlightId: string

The TermID to select from the Highlight set

Returns

Promise<void>


goToLast()

goToLast(setId): Promise<HighlightMemento>

Selects the last highlight in a given highlightSet

Parameters

setId: string

The SetID to remove the Highlight from

Returns

Promise<HighlightMemento>

the memento that was set to active


goToNext()

goToNext(setId): Promise<HighlightMemento>

Selects the next highlight in a given highlightSet

Parameters

setId: string

The SetID to remove the Highlight from

Returns

Promise<HighlightMemento>

the memento that was set to active


goToPrev()

goToPrev(setId): Promise<HighlightMemento>

Selects the previous highlight in a given highlightSet

Parameters

setId: string

The SetID to remove the Highlight from

Returns

Promise<HighlightMemento>

the memento that was set to active


highlightTerm()

highlightTerm(searchTerm, highlightConfig?, searchConfig?, termMetadata?, setMetadata?): string

Creates a highlight set for term-based highlighting and highlights the first term

Parameters

searchTerm: string

Term to search for and highlight

highlightConfig?: PartialHighlightConfig

Object that controls styling and behavior for highlights

searchConfig?: PartialTextSearchConfig

Object that controls search behavior for the term

termMetadata?: UserDataMap

Object that will be included as a property on HighlightMemento objects passed to onadd event handlers (if any).

setMetadata?: UserDataMap

Optional set metadata

Returns

string


highlightTermWithContext()

highlightTermWithContext(searchTerm, context, highlightConfig?, searchConfig?, termMetadata?, setMetadata?): string

Creates a highlight set for term-based highlighting and highlights the first term

Parameters

searchTerm: string

Term to search for and highlight

context: string

The context which the searchTerm must be contained within. if the context does not contain the searchTerm, an exception will be thrown.

highlightConfig?: PartialHighlightConfig

Object that controls styling and behavior for highlights

searchConfig?: PartialTextSearchConfig

DEPRECTATED: This parameter is no longer used by this method. It will be removed in a future version of the application. Object that controls search behavior for the term

termMetadata?: UserDataMap

Object that will be included as a property on HighlightMemento objects passed to onadd event handlers (if any).

setMetadata?: UserDataMap

Optional set metadata

Returns

string


removeHighlight()

removeHighlight(setId, highlightId): void

Removes a highlight from a given Set

Parameters

setId: string

The SetID to remove the Highlight from

highlightId: string

The TermID to remove from the Highlight set

Returns

void


removeHighlightSet()

removeHighlightSet(setId): void

Removes a highlight Set

Parameters

setId: string

The SetID to be removed

Returns

void


removeHighlightTooltip()

removeHighlightTooltip(setId, highlightId, tooltip): void

Removes the specified hover tooltip from a given highlight

Parameters

setId: string

The set ID of the highlight where the tooltip will be removed

highlightId: string

The set ID of the highlight where the tooltip will be removed

tooltip: TooltipMemento

Object representing the specific tooltip that will be removed

Returns

void


selectAnnotation()

selectAnnotation(setId, highlightId): Promise<void>

Selects the provided annotation

Parameters

setId: string

The SetID to select the Highlight from

highlightId: string

The TermID to select from the Highlight set

Returns

Promise<void>


serialize()

serialize(setId): HighlightSetMemento

Returns the Highlight Set object based on SetID

Parameters

setId: any

the SetID to get object data from

Returns

HighlightSetMemento


setHighlightSetVisibility()

setHighlightSetVisibility(setId, visible): void

Sets visibility for a given highlightSet

Parameters

setId: string

The SetID of the highlightSet to configure visibility on

visible: boolean

Boolean to set highlightSet visibility

Returns

void


setHighlightVisibility()

setHighlightVisibility(setId, highlightId, visible): void

Sets visibility for a given highlight

Parameters

setId: string

The SetID of the highlight to configure visibility on

highlightId: string

The Highlight ID of the highlight to configure visibility on

visible: boolean

Boolean to set highlight visibility

Returns

void


toggleHighlightSetVisibility()

toggleHighlightSetVisibility(setId): void

Toggles visibility for a given Set

Parameters

setId: string

The SetID to toggle visibility on

Returns

void


toggleHighlightVisibility()

toggleHighlightVisibility(setId, highlightId): void

Toggles visibility for a given Set

Parameters

setId: string

The SetID to toggle visibility on

highlightId: string

The Highlight ID of the highlight to toggle visibility on

Returns

void

Return to top of the page
Feedback