Creating a new popup menu


I want to create a popup menu that is shown on clicking on a newly created ContextPad.

I want something to look like this:

but I want to use the same popup menu that is appearing here:

Any suggestions?

1 Like


You can try to register a custom provider to PopupMenu. Note that PopupMenu class is under diagram-js library which is also a part of toolkits.

popupMenu.registerProvier API can be used to register a provider.

Have a look at ReplaceMenuProvider class under bpmn-js, which is a provider itself. You’ll then have an idea about how to implement your own provider.