Editor.Menu
Methods
Editor.Menu.popup (template[, x, y])
templatearray|object - Menu template for initialize. The template take the options of Electron's Menu Itemxnumber - The position xynumber - The position y
Send menu:popup to main process.
Editor.Menu.register (name, tmpl[, force])
namestring - The name of the register menutmplobject - Menu templateforceboolean - Force to register a menu even it was registered before.
Send menu:register to main process.
Editor.Menu.walk (template, fn)
templatearray|object - Menu template.fnfunctoin - Function applied to each menu item
Example:
Editor.Menu.walk(menuTmpl, item => {
if ( item.params ) {
item.params.unshift('Hello');
}
if (item.message === 'foobar:say-hello') {
item.enabled = false;
}
});