Interface: IHyperlinkManagerApi

Remarks

Partial IHyperlinkManager interface that defines the hyperlink API methods

Methods

activate()

activate(hyperlink): boolean

Activates a hyperlink. This function is automatically called when the user clicks on a hyperlink, but may also be called at any point, with or without user input, to activate a hyperlink.

NOTE: For security reasons, external hyperlinks that are not entity links may not be activated either by the user or by calling this function.

Parameters

hyperlink: Hyperlink

The hyperlink to activate

Returns

boolean

true if the hyperlink was activated, or false if any of the activate event listeners returned false or the hyperlink wasn't activated for some other reason.


add()

add(target, options): Hyperlink

Adds a hyperlink attached to the specified target to this set

Parameters

target: HyperlinkRange

The range of text that the hyperlink should be targetting

options: HyperlinkOptions

The options for the hyperlink

Returns

Hyperlink

The hyperlink that was added


forPage()

forPage(page): Hyperlink[]

Returns an array containing the hyperlinks that appear on the specified page

Parameters

page: Page

The page to get hyperlinks for

Returns

Hyperlink[]


forRange()

forRange(range): Hyperlink[]

Returns an array containing the hyperlinks that overlap the specified range

Parameters

range: HyperlinkRange

The range to get hyperlinks for

Returns

Hyperlink[]


remove()

remove(hyperlink): void

Removes a hyperlink that was added manually with add()

Parameters

hyperlink: Hyperlink

The hyperlink to be removed

Returns

void