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 '@mnaoumov/obsidian-lib/notebook-navigator';

Signature:

export interface NotebookNavigatorFileMenuContext extends NotebookNavigatorMenuContext

Extends: NotebookNavigatorMenuContext

Properties

PropertyTypeDescription
addItem(callback: (item: MenuItem) => void) => voidAdds an item to the menu Notebook Navigator is building.
(Inherited from NotebookNavigatorMenuContext)
fileTFileThe file that was right-clicked.
selectionNotebookNavigatorFileMenuSelectionWhat the tree had selected when the menu was raised.

Links to this page: