Skip to content

Workspace.handleLinkContextMenu method

Workspace › handleLinkContextMenu

Official

Add a context menu to internal file links.

Signature:

handleLinkContextMenu(menu: Menu, linktext: string, sourcePath: string, leaf?: WorkspaceLeaf): boolean

Parameters:

ParameterTypeDescription
menuMenu
linktextstring
sourcePathstring
leaf?WorkspaceLeaf*(Optional)*

Returns: boolean

Since: 0.12.10


Unofficial

Handle the context menu for an internal link.

Signature:

handleLinkContextMenu(menu: Menu, linkText: string, sourcePath: string, leaf?: WorkspaceLeaf): void

Parameters:

ParameterTypeDescription
menuMenuThe context menu.
linkTextstringThe internal link text.
sourcePathstringThe source path of the link.
leaf?WorkspaceLeafThe leaf to add context actions for.

Returns: void

Since: 0.12.10