onContextMenuShow

onContextMenuShow

The function called when the context menu has been shown.

Parameters:

Name Type Description
options Object

Defines the options for the current selection.

Example

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

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