Skip to content
Document Authoring DA  API Docs v1.22.2
npmGitHub

ContextMenuGroup>= v1.23.0

ContextMenuGroup:

A section of context menu items, separated from the rest of the menu by a divider like the menu’s built-in sections.

A group whose items are all hidden is not shown.

editor.setContextMenuConfig({
text: {
items: [
{
type: 'group',
id: 'translate',
title: 'Translate',
items: [
{ type: 'action', id: 'translate-es', actionId: 'custom.translate-es' },
{ type: 'action', id: 'translate-fr', actionId: 'custom.translate-fr' },
],
},
],
},
});

type: "group"


id: string

Unique ID for this group


optional title: string

Name of the group. Screen readers announce it. The menu doesn’t currently draw it, so give each item a label that makes sense on its own; a later version may show the title as a heading.


items: ContextMenuActionItem[]

The group’s items