Extensions
Context Menu
Custom right-click menu inside the editor
Replaces the browser's default right-click menu with a custom one. Useful for cut/copy/paste, duplicate, transform-to, and other editor actions.
Install
pnpm add @typix-editor/extension-context-menuLive demo
Custom items
The UI component accepts a custom items array:
import type { TypixContextMenuItem } from "@typix-editor/extension-context-menu";
const items: TypixContextMenuItem[] = [
{ id: "cut", label: "Cut", shortcut: "⌘X", onSelect: () => editor.chain().cut().run() },
{ id: "duplicate", label: "Duplicate block", onSelect: () => /* ... */ },
];
<EditorContextMenu items={items} />Vendor the UI
npx typix ui add context-menu