mirror of
https://github.com/marktext/marktext.git
synced 2025-05-17 01:10:41 +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' })
|
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 => {
|
export const open = win => {
|
||||||
const filename = dialog.showOpenDialog(win, {
|
const filename = dialog.showOpenDialog(win, {
|
||||||
properties: [ 'openFile' ],
|
properties: [ 'openFile' ],
|
||||||
|
@ -55,6 +55,8 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
label: 'Print',
|
label: 'Print',
|
||||||
accelerator: 'CmdOrCtrl+P',
|
accelerator: 'CmdOrCtrl+P',
|
||||||
click: function () {}
|
click: function (menuItem, browserWindow) {
|
||||||
|
actions.print(browserWindow)
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user