diff --git a/src/native/window.ts b/src/native/window.ts index d1b3e05..5d00213 100644 --- a/src/native/window.ts +++ b/src/native/window.ts @@ -149,7 +149,7 @@ export function createMainWindow() { // configure spellchecker context menu mainWindow.webContents.on("context-menu", (_, params) => { const menu = new Menu(); - + if (params.isEditable) { // add all suggestions for (const suggestion of params.dictionarySuggestions) { menu.append( @@ -180,6 +180,15 @@ export function createMainWindow() { click() { config.spellchecker = !config.spellchecker; }, + }), + ); + } + + menu.append( + new MenuItem({ + label: "Copy Image", + visible: params.hasImageContents, + click: () => mainWindow.webContents.copyImageAt(params.x, params.y), }), );