I have been messing with setting up my own editor and just playing with the example code provided here and there. Now one way or another I have messed something up : ) because backspace, enter does no longer work.
I have tried many things but I can not get to the bottom of the problem. I was wondering if anybody has any suggestions how I could trouble shout this issue. No error messages to go by sorry …
Repo is here
Thank you,
This sort of error happens if for some reason or another the basic keymap is missing. Which is responsible for handling the enter key and the backspace (as well as some others).
https://github.com/ProseMirror/prosemirror-commands package contains the baseKeymap.
https://github.com/ProseMirror/prosemirror-keymap/blob/master/src/keymap.js
contains a function which looks like
export function keymap(bindings) {
return new Plugin({props: {handleKeyDown: keydownHandler(bindings)}})
}
This function however does not check if bindings
is undefined.
In my case I accidentally did keymap()
, instead of keymap(baseKeymap)
God knows why : )