Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.09 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.09 KB

electron-contextmenu-wrapper

electron-contextmenu-wrapper was forked from electron-spellchecker to provide a robust context handling library that's also callable from inside of a webview preloader.

Quick Start

const {ContextMenuListener, ContextMenuBuilder} = require('electron-contextmenu-wrapper');

let contextMenuBuilder = new ContextMenuBuilder();
let contextMenuListener = new ContextMenuListener((event, info) => {
  contextMenuBuilder.showPopupMenu(info);
});

Additionally, there are

ContextMenuBuilder.prependContextMenuItem(new MenuItem(label: "Work!"))

and

ContextMenuBuilder.appendContextMenuItem(new MenuItem(label: "Smarter!"))

to customize the context menus.

Learning more