Prevent undoInputRule on certain InputRules

Hi, first I want to thank you for making prosemirror an awesome editor. Currently I am working with InputRules to add german typographical Quotes which are a bit different to the english ones. But there is one thing I would like to prevent and that is the logic for the backspace key after the rule is applied. Is there an easy way of preventing the call to the command undoInputRule? Or is the way to go to create my own InputRules plugin? Regards, Martin.

Don’t bind it to backspace?

Can you give me a hint on how I would be doing that without writing my own InputRule? Is there a way to remove commands? I have not found where the key to command bindings are stored.

The input-rules package doesn’t bind anything by default. Maybe you’re using prosemirror-example-setup, if you have that key bound without knowing about it. That has some way to override key bindings through a config argument, I believe.

Actually I am using tiptap - a vue wrapper for prosemirror and I found that the setup in there is adding the keybinding. The hint that the input-rules package doesn’t add anything by default was most helpful. Thanks a lot.

@marijn is it possible to exclude specific input rules though? Eg I want undoInputRule to fire, but I want to exclude a single InputRule from being undoable this way.

Is there any way?

Does this patch look like it’d help?

1 Like

I apologize for overlooking this. Thanks very much for your reply @marijn! I think that would be a great help!

I’ve tagged prosemirror-inputrules 1.3.0