1
0
Fork 0
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:
Andrew Simachev 2022-01-20 19:22:50 +03:00
parent c74c8658e1
commit 65f3ce8a54
2 changed files with 16 additions and 0 deletions

View file

@ -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);
});
};