Skip to content

ramboxapp/electron-contextmenu-wrapper

 
 

Repository files navigation

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

About

Implement context menus, correctly

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.3%
  • HTML 4.7%