ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.61k stars 336 forks source link

InputRule and history undo #1341

Closed PRR24 closed 1 year ago

PRR24 commented 1 year ago

Please provide a (simple) means to detach transformations done by an InputRule from other transformations in the history, so that the InputRule's transformation could be undone without undoing anything else at the same time.

For example, after entering "...", ellipsis rule will transform/autocorrect these dots to ellipsis. But if ellipsis cannot be used at that location, there is no easy way to undo the transformation without undoing dot-entering altogether. The same applies also to more complex rules, like unwanted auto-linking etc.

Thank you.

marijnh commented 1 year ago

Did you see the undoInputRule command?

PRR24 commented 1 year ago

Thank you. It is not a perfect solution, but after digging around I think I understand why it is implemented this way.