Skip to content

Commit f6b2e0e

Browse files
committed
Import image works from menu
1 parent 95f8466 commit f6b2e0e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

main.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ function addInsertBarItems(config, submenu) {
463463
submenu.push({
464464
label: 'Insert Image',
465465
accelerator: acceleratorFor(image),
466-
click: insertImage
466+
click: () => { getWebContents().executeJavaScript('MU.openImageDialog()') }
467467
})
468468
}
469469
if (tableItem) {
@@ -835,19 +835,6 @@ function acceleratorFor(keymap) {
835835
return accelerator
836836
}
837837

838-
function insertLink() {
839-
console.log("Insert a link")
840-
}
841-
842-
function insertImage() {
843-
console.log("Insert an image")
844-
}
845-
846-
function insertTable() {
847-
console.log("Insert a table")
848-
}
849-
850-
851838
/** Return a template suitable for `Menu.buildFromTemplate` on a non-Mac device (haha, tested only on a Mac, though) */
852839
const nonMacTemplate = [
853840
// { role: 'appMenu' }

0 commit comments

Comments
 (0)