We use the context menu (v4.0.4) like this:
import contextMenu from 'electron-context-menu'
let win: BrowserWindow | null
const windowConfig = {
title: 'My App',
icon: '../favicon.ico',
width: 1300,
height: 700,
autoHideMenuBar: true,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
}
contextMenu({
showInspectElement: false,
showSearchWithGoogle: false,
showSaveImageAs: true,
showLearnSpelling: false,
showLookUpSelection: false,
prepend: (defaultActions, params) => [
{
label: 'Open in New Window',
visible: params.linkURL.length > 0,
click: () => {
const newWin = new BrowserWindow(windowConfig)
newWin.loadURL(params.linkURL)
}
}
]
})
However, when we try to save an image bigger then (let say 2Mb), we get the following error:
What could be the cause?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too