This is a minimalist HTML and JavaScript skeleton of the GoJS Sample customContextMenu.html. It was automatically generated from a button on the sample page, and does not contain the full HTML. It is intended as a starting point to adapt for your own usage. For many samples, you may need to inspect the full source on Github and copy other files or scripts.

This text is displayed if your browser does not support the Canvas HTML element.

This demonstrates the implementation of a custom HTML context menu.

For a light-box style HTML context menu implementation, see the LightBox Context Menu sample.

Right-click or tap-hold on a Node to bring up a context menu. If you have a selection copied in the clipboard, you can bring up a context menu anywhere to paste.

GoJS version 2.2.15. Copyright 1998-2022 by Northwoods Software.

View this sample page's source on GitHub