Skip to content

MarkdownViewportMenuEventHandler

Handler 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.

Import:

import type { MarkdownViewportMenuEventHandler } from 'obsidian-dev-utils/obsidian/menu-event-registrar';

Signature:

export type MarkdownViewportMenuEventHandler

Signature:

type MarkdownViewportMenuEventHandler = (menu: Menu, view: MarkdownView, mode: string, source: string) => void

Type: (menu: Menu, view: MarkdownView, mode: string, source: string) => void


Links to this page: