Skip to content

CanvasPluginInstance.onFileMenu method

CanvasPluginInstance › onFileMenu

Unofficial

Adds canvas-related items to the file context menu.

Signature:

onFileMenu(menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf | undefined): void

Parameters:

Parameter Type Description
menu Menu The menu to add to.
file TAbstractFile The file or folder the menu was opened on.
source string The source of the menu (e.g. 'file-explorer-context-menu').
leaf? WorkspaceLeaf | undefined The leaf the menu was opened from.

Returns: void