Interface: IContentHighlightingService

Content Highlighting Framework API for interacting with high-level content highlighting features

Properties

enabled

readonlyenabled: boolean

Whether or not the framework is enabled


features

readonlyfeatures: IContentHighlightingFeature[]

All of the registered content highlighting features

Methods

disable()

disable(): void

Disables the Content Highlighting Framework

Returns

void


disableFeature()

disableFeature(featureId): void

Disables a particular content highlighting feature by ID

Parameters

featureId: string

Feature ID

Returns

void


enable()

enable(): void

Enables the Content Highlighting Framework

Returns

void


enableFeature()

enableFeature(featureId): void

Enables a particular content highlighting feature by ID

Parameters

featureId: string

Feature ID

Returns

void


getFeature()

getFeature(featureId): IContentHighlightingFeature

Retrieves a registered content highlighting feature by ID

This will return undefined when a feature with the provided ID cannot be found

Parameters

featureId: string

Feature ID

Returns

IContentHighlightingFeature

The registered content highlighting feature


getFeatureEnabled()

getFeatureEnabled(featureId): boolean

Retrieves the enabled status of a particular content highlighting feature by ID

Parameters

featureId: string

Feature ID

Returns

boolean

Boolean indicating whether the feature is enabled or not


offenabledchange()

offenabledchange(handler): void

Unregisters an event handler that fires when the Content Highlighting Framework is enabled or disabled

Parameters

handler: ContentHighlightingServiceEnabledChangeHandler

Event handler

Returns

void


offfeatureenabledchange()

offfeatureenabledchange(handler): void

Unregisters an event handler that fires when the a content highlighting feature is enabled or disabled

Parameters

handler: ContentHighlightingServiceFeatureEnabledChangeHandler

Event handler

Returns

void


offfeatureregistered()

offfeatureregistered(handler): void

Unregisters an event handler that fires when a new content highlighting feature is registered

Parameters

handler: ContentHighlightingServiceFeatureRegisteredHandler

Event handler

Returns

void


onenabledchange()

onenabledchange(handler): void

Registers an event handler that fires when the Content Highlighting Framework is enabled or disabled

Parameters

handler: ContentHighlightingServiceEnabledChangeHandler

Event handler

Returns

void


onfeatureenabledchange()

onfeatureenabledchange(handler): void

Registers an event handler that fires when the a content highlighting feature is enabled or disabled

Parameters

handler: ContentHighlightingServiceFeatureEnabledChangeHandler

Event handler

Returns

void


onfeatureregistered()

onfeatureregistered(handler): void

Registers an event handler that fires when a new content highlighting feature is registered

Parameters

handler: ContentHighlightingServiceFeatureRegisteredHandler

Event handler

Returns

void


setEnabled()

setEnabled(enabled): void

Sets the enabled status of the Content Highlighting Framework

Parameters

enabled: boolean

New value

Returns

void


setFeatureEnabled()

setFeatureEnabled(featureId, enabled): void

Sets the enabled status of a particular content highlighting feature

Parameters

featureId: string

Feature ID

enabled: boolean

New value

Returns

void


toggleEnabled()

toggleEnabled(): boolean

Toggles the enabled status of the Content Highlighting Framework

Returns

boolean

Boolean indicating the new enabled status


toggleFeatureEnabled()

toggleFeatureEnabled(featureId): boolean

Toggles the enabled status of a particular content highlighting feature by ID

Parameters

featureId: string

Feature ID

Returns

boolean

Boolean indicating the new enabled status of the feature