A generic object to contain any information creating a menu might need.
It is a little easier to use CustomMenuConfig, CustomDropdownMenu, or CustomContentDockMenu.
Properties
action?
optional action: string;
The registered action to run when the menu item is clicked
disabledAction?
optional disabledAction: string;
If specified, what action's return value should determine if this menu item is disabled?
file?
optional file: object;
If specified, this menu item should launch a file picker
accept
accept: string;
An accept string as specified for HTML file inputs
action
action: string;
An action registered with EditorClient.registerFileUploadAction
binary?
optional binary: boolean;
If true, send the file contents to the callback action as a Uint8Array as well as a plain text string
singleFileOnly?
optional singleFileOnly: boolean;
If true, only allow a single file to be selected for upload
iconUrl?
optional iconUrl: string;
The icon to display on the menu item.
A URL (a data URI is fine) pointing to an icon representing the integration.
This will be displayed at up to 32x32 CSS pixels in size.
NOTE: Not all menuTypes support displaying an icon
label
label: string;
The text to display on the menu item
location?
optional location: MenuLocation;
Where in that menu to display this item
menuType
menuType: MenuType;
Which menu to display this item in
visibleAction?
optional visibleAction: string;
If specified, what action's return value should determine if this menu item is visible?