Intercepting key events

#1

Hi,

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.

0 Likes

#2

Yes, absolutely

0 Likes

#3

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

0 Likes