Intercepting key events


This is looking very promising. I’ve contributed to CodeMirror in the past so looking forward to using this after not seeing much activity on the Quill editor project.

I’m implementing an editor made up of a series of ‘blocks’ — think Wordpress’ Gutenberg editor — where each block will have its own editor instance. I will have a heading, paragraph, etc. blocks as well as structured data blocks, galleries etc. My question is, can I tap into the key bindings so for example when the user hits return whilst in the editor, I can create a new block in my app and instanciate a new editors etc? Therefore most blocks should only allow bold, italic, links and no hard returns as this would instanciate a new block and thus a new ProseMirror instance.

1 Like

Yes, absolutely

Great, thanks Marijn. Look forward to giving it a go in a couple of weeks.

I guess I am about to reinvent the wheel then. Is your block based editor open source @thelucid? :wave:

It will be, but not quite ready yet.

1 Like

Hi @thelucid, would you share your code with me privately? Even if it is not ready?

I am having super basic issues and I would love to see how an experienced prosemirror dev would handle them.

As an example, look at this issue :woozy_face: