mirror of
https://github.com/marktext/marktext.git
synced 2025-05-16 17:00:30 +08:00
feat: update print menu item
This commit is contained in:
parent
e4075cb98b
commit
309ece1e0c
@ -119,6 +119,10 @@ export const exportHTML = (win, withStyle) => {
|
||||
win.webContents.send('AGANI::export', { type: withStyle ? 'styledHtml' : 'html' })
|
||||
}
|
||||
|
||||
export const print = win => {
|
||||
win.webContents.print({ silent: false, printBackground: false, deviceName: '' })
|
||||
}
|
||||
|
||||
export const open = win => {
|
||||
const filename = dialog.showOpenDialog(win, {
|
||||
properties: [ 'openFile' ],
|
||||
|
@ -55,6 +55,8 @@ export default {
|
||||
}, {
|
||||
label: 'Print',
|
||||
accelerator: 'CmdOrCtrl+P',
|
||||
click: function () {}
|
||||
click: function (menuItem, browserWindow) {
|
||||
actions.print(browserWindow)
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user