You can customize the menus of widget fields, widgets, and lists to provide additional functionality to editors, e.g. splitting or joining widgets, translating or converting their content, etc. See below for a fully functional example of how to insert an item into widget menus.
For accessing the menu object of a DOM element that represents a piece of CMS content,
scrivito("menu") is available. Currently, this only applies to DOM elements that represent either widgets (the element has a
data-scrivito-widget-obj-class attribute) or widget fields (the
widgetlist). The menu object has several methods.
add to create new menu items: