Creating a custom menu

I’m currently really confused by the whole menu system. I’ve looked at a lot of examples that aren’t built with just prosemirror-example-setup but they all seem to break some really key functionality like:

  • Pressing return on lists doesn’t create another bulletpoint but adds a newline to the current bullet
  • Pressing delete doesn’t remove the current formatting

There’s just a lot to implement and I have not been able to find any clear way to rebuild all this functionality on my own even after reading the documentation.

I’m honestly 100% fine keeping the functionality of prosemirror-example-setup, all I want to do is customise my menubar to have a handful of options.

I know exampleSetup() accepts a {menuContent: [MenuItem]} option but I cannot for the life of me understand how a MenuItem is created or what options it should contain.

I’ve Googled as much as possible and switched to typescript in the hope that it would be defined somewhere, but that is not the case as prosemirror-example-setup doesn’t have any types.

What I want to achieve is:

  • Make the big code block a toggleable option and remove it from the dropdown
  • Remove the select parent node option

If anyone could give me a hand with either making these two changes or helping me understand how to get an entirely custom menu without losing all the functionality of the example I would be forever thankful to them.