mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
save page to mhtml
This commit is contained in:
parent
c74c8658e1
commit
65f3ce8a54
2 changed files with 16 additions and 0 deletions
12
electron.js
12
electron.js
|
@ -640,6 +640,10 @@ function menuInit () {
|
|||
label: 'Create workspace',
|
||||
click: () => { send('commandGlobal', 'workspace'); }
|
||||
},
|
||||
{
|
||||
label: 'Save page as HTML',
|
||||
click: () => { savePage(); }
|
||||
},
|
||||
]
|
||||
});
|
||||
};
|
||||
|
@ -853,3 +857,11 @@ function exit (relaunch) {
|
|||
send('shutdown', relaunch);
|
||||
};
|
||||
};
|
||||
|
||||
function savePage () {
|
||||
win.webContents.savePage(tmpPath + '/page.mhtml', 'MHTML').then(() => {
|
||||
console.log('Page was saved successfully.')
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue