Skip to content

obsidian/menu-event-registrar

Menu event registrar.

InterfaceDescription
MenuEventRegistrarRegisters menu event handlers with lifecycle management.
TypeDescription
EditorMenuEventHandlerHandler for the editor context menu event.
FileMenuEventHandlerHandler for the single-file context menu event.
FilesMenuEventHandlerHandler for the multi-file context menu event.
MarkdownViewportMenuEventHandlerHandler for the markdown viewport (margin) context menu event. This is the menu raised by right-clicking the empty space BESIDE the text — the one carrying Readable line length / Line numbers / Inline title — or the line-number gutter. It is a different menu from the editor one: with Readable line length on, the text is centred inside a narrower .cm-sizer, so a margin click lands outside the editor’s contentDOM and editor-menu never fires.