TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

UpdateContextMenuItem

UpdateContextMenuItem(items)

Updates an item in the context menu with the specified items.

Parameters:

Name Type Description
items Array.<ContextMenuItem>

An array containing the context menu items for the current item.

Returns:

This method doesn't return any data.

Example

Copy code
window.Asc.plugin.attachEvent('onContextMenuShow', function(options) {
	if (!options) return;

	if (options.type === 'Selection' || options.type === 'Target')
		this.executeMethod('UpdateContextMenuItem', [getContextMenuItems()]);
});