Menu


Constructors

new Menu()

new Menu(client): Menu

Parameters

ParameterType
clientEditorClient

Returns

Menu


Methods

addContentDockMenuItem()

addContentDockMenuItem(item): void

Create an icon tied to an action (required) that appears in the left toolbar in Lucidspark and Teamspaces (not in Lucidchart).

The action must be registered with
EditorClient.registerAction
prior to using it in the menu.

Parameters

ParameterTypeDescription
itemCustomContentDockMenuThe definition of the new menu item

Returns

void


addContextMenuItem()

addContextMenuItem(item): void

Create a menu in the right click context menu. Appears in both Lucidspark and Lucidchart.

The action must be registered with
EditorClient.registerAction
prior to using it in the menu.

Parameters

ParameterTypeDescription
itemCustomMenuConfigThe definition of the new menu item

Returns

void


addDropdownMenuItem()

addDropdownMenuItem(item): void

Create a menu in the basic drop down top menus. In Lucidspark this will just be under the generic menu.
In Lucidchart you can configure this to be in any of the other drop down menus.

The action must be registered with
EditorClient.registerAction
prior to using it in the menu.

Parameters

ParameterTypeDescription
itemCustomDropdownMenuThe definition of the new menu item

Returns

void


addMenuItem()

addMenuItem(item): void

Generic function to create a new menu item to trigger custom code.
You can use addDropdownMenuItem, addContextMenuItem, or addContentDockMenuItem for easier to use entrypoints.

The action must be registered with
EditorClient.registerAction
prior to using it in the menu.

Parameters

ParameterTypeDescription
itemCustomMenuItemThe definition of the new menu item

Returns

void