For example, I was using this:
<button onclick="editor.chain().focus().toggleBold().run()">
But I got the solution from the kind folks on the discord server.
For the menu item, specify type=button (otherwise browser might think it's a submit button type)
<button type=button onclick="editor.chain().focus().toggleBold().run()">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With