Skip to content

NotebookNavigatorFileMenuContext

What menus.registerFileMenu hands a subscriber when a FILE is right-clicked.

There is no Menu here — an item is contributed through addItem alone, which is why the file/files menu handlers cannot simply be forwarded to it and have to be bridged (see components/notebook-navigator-menu-event-registrar-component.ts).

Import:

import type { NotebookNavigatorFileMenuContext } from 'obsidian-dev-utils/obsidian/notebook-navigator';

Signature:

export interface NotebookNavigatorFileMenuContext extends NotebookNavigatorMenuContext

Extends: NotebookNavigatorMenuContext

Properties

PropertyTypeDescription
fileTFileThe file that was right-clicked.
selectionNotebookNavigatorFileMenuSelectionWhat the tree had selected when the menu was raised.

Methods

MethodReturnsDescription
addItem(callback)voidAdds an item to the menu Notebook Navigator is building.
(Inherited from NotebookNavigatorMenuContext)