UpdateContextMenuItem
Updates an item in the context menu with the specified items.
Syntax
expression.UpdateContextMenuItem(items);
expression
- A variable that represents a Api class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
items | Required | ContextMenuItem[] | An array containing the context menu items for the current item. |
Returns
This method doesn't return any data.
Example
window.Asc.plugin.attachEvent('onContextMenuShow', function(options) {
if (!options) return;
if (options.type === 'Selection' || options.type === 'Target')
this.executeMethod('UpdateContextMenuItem', [getContextMenuItems()]);
});