Interface: ILinkMatcherOptions

An object containing options for a link matcher.

Hierarchy

  • ILinkMatcherOptions

Index

Properties

Properties

Optional leaveCallback

leaveCallback? : function

Defined in xterm.d.ts:337

A callback that fires when the mouse leaves a link. Note that this can happen even when tooltipCallback hasn’t fired for the link yet.

Type declaration:

▸ (): void


Optional matchIndex

matchIndex? : number

Defined in xterm.d.ts:319

The index of the link from the regex.match(text) call. This defaults to 0 (for regular expressions without capture groups).


Optional priority

priority? : number

Defined in xterm.d.ts:344

The priority of the link matcher, this defines the order in which the link matcher is evaluated relative to others, from highest to lowest. The default value is 0.


Optional tooltipCallback

tooltipCallback? : function

Defined in xterm.d.ts:331

A callback that fires when the mouse hovers over a link for a period of time (defined by ITerminalOptions.linkTooltipHoverDuration).

Type declaration:

▸ (event: MouseEvent, uri: string, location: IViewportRange): *boolean void*

Parameters:

Name Type
event MouseEvent
uri string
location IViewportRange

Optional validationCallback

validationCallback? : function

Defined in xterm.d.ts:325

A callback that validates whether to create an individual link, pass whether the link is valid to the callback.

Type declaration:

▸ (uri: string, callback: function): void

Parameters:

uri: string

callback: function

▸ (isValid: boolean): void

Parameters:

Name Type
isValid boolean

Optional willLinkActivate

willLinkActivate? : function

Defined in xterm.d.ts:352

A callback that fires when the mousedown and click events occur that determines whether a link will be activated upon click. This enables only activating a link when a certain modifier is held down, if not the mouse event will continue propagation (eg. double click to select word).

Type declaration:

▸ (event: MouseEvent, uri: string): boolean

Parameters:

Name Type
event MouseEvent
uri string