DocMosaicdocs
Primitives

Editor.ContextMenu

Right-click menu wrapper. Auto-discriminates between section menu and canvas menu.

Right-click menu wrapper. Auto-discriminates between section menu and canvas menu.

Usage

import { Editor } from '@docmosaic/react';

<Editor.Root>
    <Editor.ContextMenu />
</Editor.Root>;

API Reference

PropTypeDefaultDescription
children *ReactNode-

Children wrapped by the right-click trigger. Typically Editor.Canvas (or the page surface inside a custom shell).

keymapPartial<EditorKeymap> | undefined-

Override the displayed shortcut chips. Defaults to DEFAULT_KEYMAP. Pass the same partial map you handed to Editor.Root keybindings so the inline shortcuts match the active runtime

  • the menu items themselves dispatch through useEditor actions regardless.
classNamestring | undefined-

Optional class applied to the trigger wrapper.

  • Root - the orchestrator