Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(Keymap): Add Backspace shortcut to undo input rules
The upstream Tiptap Keymap extension that we don't use (anymore) also
provides this.

It allows to undo the automatic changes from input rules directly after
they got applied by hitting <Backspace>.

Unfortunately this doesn't work for nodes that get changed by the
TextDirection extension due to a bug, but there's still plenty of input
rules where it works, so let's bring it in.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Jul 29, 2025
commit bfb19fdc6927c51c22cebfe1a27353fc4986611b
5 changes: 5 additions & 0 deletions src/extensions/Keymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const Keymap = Extension.create({
emit('text:keyboard:outline')
return true
},
/**
* <Backspace>
* Allows to undo input rules after they got automatically applied
*/
Backspace: () => this.editor.commands.undoInputRule(),
}
},

Expand Down