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:

ParameterTypeDescription
menuMenuThe menu to add to.
fileTAbstractFileThe file or folder the menu was opened on.
sourcestringThe source of the menu (e.g. 'file-explorer-context-menu').
leaf?WorkspaceLeaf | undefinedThe leaf the menu was opened from.

Returns: void