accelerator: 'CmdOrCtrl+V',
role: 'paste'
},
+ {
+ label: 'Paste and Match Style',
+ accelerator: 'Shift+Command+V',
+ role: 'pasteandmatchstyle'
+ },
+ {
+ label: 'Delete',
+ role: 'delete'
+ },
{
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
}
]
})
- template[3].submenu.push(
+ template[3].submenu = [
+ {
+ label: 'Close',
+ accelerator: 'CmdOrCtrl+W',
+ role: 'close'
+ },
+ {
+ label: 'Minimize',
+ accelerator: 'CmdOrCtrl+M',
+ role: 'minimize'
+ },
+ {
+ label: 'Zoom',
+ role: 'zoom'
+ },
{
type: 'separator'
},
label: 'Bring All to Front',
role: 'front'
}
- )
+ ]
}
const menu = Menu.buildFromTemplate(template)
* `hideothers` - Map to the `hideOtherApplications` action
* `unhide` - Map to the `unhideAllApplications` action
* `front` - Map to the `arrangeInFront` action
+* `zoom` - Map to the `performZoom` action
* `window` - The submenu is a "Window" menu
* `help` - The submenu is a "Help" menu
* `services` - The submenu is a "Services" menu
accelerator: 'CmdOrCtrl+V',
role: 'paste'
},
+ {
+ label: 'Paste and Match Style',
+ accelerator: 'Shift+Command+V',
+ role: 'pasteandmatchstyle'
+ },
+ {
+ label: 'Delete',
+ role: 'delete'
+ },
{
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
]
});
// Window menu.
- template[3].submenu.push(
+ template[3].submenu = [
+ {
+ label: 'Close',
+ accelerator: 'CmdOrCtrl+W',
+ role: 'close'
+ },
+ {
+ label: 'Minimize',
+ accelerator: 'CmdOrCtrl+M',
+ role: 'minimize'
+ },
+ {
+ label: 'Zoom',
+ role: 'zoom'
+ },
{
type: 'separator'
},
label: 'Bring All to Front',
role: 'front'
}
- );
+ ];
}
const menu = Menu.buildFromTemplate(template);