Quick start
The context menu is enabled by default. Right-click anywhere in the document to open it. To disable it:Configuration
Top-level option to disable the context menu entirely
Whether to include the built-in menu items
Custom menu sections to add or merge. See Custom Items.
Advanced: function to fully control menu contents. See Menu Provider.
Default items
Items shown depend on document context.Right-click
Custom items
Add custom items by defining sections incustomItems. Each section has an id and an array of items.
Item properties
string
required
Unique identifier for the item
string
required
Display text shown in the menu
string
SVG string for the item icon
function
Handler called when the item is clicked. Receives
(editor, context).Component
Vue component to render as a popover when the item is selected (e.g., a table grid picker)
function
Function that receives the context object and returns
boolean. Items without showWhen are always visible.function
Custom render function for the menu item. Receives the context and should return an
HTMLElement.Merging with default sections
If a custom section has the sameid as a default section, the items are merged:
Menu provider
For full control over menu contents, usemenuProvider. It receives the context and the computed sections array, and should return a new sections array.
Context object
BothshowWhen and menuProvider receive a context object with the current editor state:

