ContextMenuConfig>= v1.23.0
ContextMenuConfig:
{}Host items to add to the editor’s context menus, one entry per kind of menu.
Host items come after the built-in items. Built-in items follow DocAuthEditor.setActions: one whose action is left out is hidden.
Example
Section titled “Example”const editor = await system.createEditor(target, { ui: { actions: [ { id: 'custom.define', label: 'Look up definition', handler: () => showDefinition() }, ], contextMenu: { text: { items: [{ type: 'action', id: 'define', actionId: 'custom.define' }] }, }, },});UIOptions.contextMenufor setting the context menu during editor creation.- DocAuthEditor.setContextMenuConfig for changing it at runtime.
Properties
Section titled “Properties”
optionaltext:ContextMenuItems
Items for the menu that opens when the user right-clicks text, including text in table cells and in shapes. In edit and review mode these items are not shown when an image or shape itself is right-clicked. In view mode images and shapes don’t take pointer input, so right-clicking one opens the text menu.