Help Needed: Customizing Replace Menu in Angular

Hey BPMN Community,

Just diving into BPMN within Angular for a school project.
Struggling to customize the replace menu by removing specific options. Tried forum solutions with no luck. Any tips?
Here’s the GitHub link to my project: GitHub - mouadfellak6/test2

What have you tried so far? In your Code, where are you adding or removing options? Why is the CustomReplaceMenuProvider in your Repo empty?

Please share a working example and clearly explain what you tried and where you are stuck

Created a CustomReplaceMenuProvider: This class registers itself as a provider for the replace menu and modifies the menu entries, such as removing the ‘replace-with-task’ option. Instantiated the CustomReplaceMenuProvider within the ngAfterContentInit method of DiagramComponent, passing only the popupMenu.


Why do you want to do it in the Angular lifecycle instead of adding it as a bpmn-js extension?

Can you show me how to do it as a bpmn-js extension to fix it?

Please have a look at the walkthrough. It explains the basic
setup of the modeler and how to extend it: bpmn-js walkthrough | Toolkits |

can you give me a working example?