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 NotebookNavigatorMenuContextExtends: NotebookNavigatorMenuContext
Properties
| Property | Type | Description |
|---|---|---|
| file | TFile | The file that was right-clicked. |
| selection | NotebookNavigatorFileMenuSelection | What the tree had selected when the menu was raised. |
Methods
| Method | Returns | Description |
|---|---|---|
| addItem(callback) | void | Adds an item to the menu Notebook Navigator is building. (Inherited from NotebookNavigatorMenuContext) |