I am unable to use enter key in keymap
this.editor.registerPlugin(keymap({
'Enter': printSomething
}))
this doesn't work in tiptap, but something similar works in prosemirror
Help
it was added use basekeymap in tiptap/Editor.js
overrode it for my usecase
You could also register a custom plugin.
import { Editor, EditorContent, EditorMenuBar, Extension } from 'tiptap'
new Editor({
extensions: [
new class extends Extension {
keys() {
return {
Enter(state, dispatch, view) {
// return true prevents default behaviour
return true
},
}
}
}(),
],
content: '',
});
Most helpful comment
You could also register a custom plugin.