I’m building autocompletion on top of prosemirror-suggestions, things work relatively fine but the only issue I’m having is that the Enter key is not passed to the handleKeyDown event.
The definition of handleKeyDown in prosemirror-suggestions is:
handleKeyDown: function handleKeyDown(view, event) {
var _getState = this.getState(view.state),
active = _getState.active;
if (!active) return false;
return onKeyDown({ view: view, event: event });
},
As I’m pretty new to prosemirror I have inserted a console.log call at the start of the function definition, just to be sure that the issue wasn’t because of the getState.active variable.
I’d appreciate a few pointers on how I could capture the Enter key, as I want to use it as the autocompletion selection event; while also preventing the insertion of a newline during autocompletion.