Enter to create a new paragraph?

Is this functionality not supported “out of the box?”

I just walked through the getting started guide and when I finish my little demo editor can undo and redo but I can’t hit enter to create a new paragraph.

Is that by design? It seems quite confusing if so. What’s the next step to add some basic default text editor functions like paragraphs?

Yes, that’s by design. You’ll want to add keymap(baseKeymap) (with keymap from prosemirror-keymap and baseKeymap from prosemirror-commands) as a plugin to get the default key bindings.

Would you accept a PR for adding this info in the docs?

Where would you add it? This part of the guide already mentions it.

I completely missed it since I was looking for information about keymaps and not commands.

I think a “cookbook” section for common practical solutions would greatly improve the docs for people (like myself) not familiar with the architecture of ProseMirror.

Edit: In case it’s not clear I’d gladly help making the docs better in any way I can.

The examples are kind intended to fill that role. Though most, maybe all, of them use example-setup, which I guess hides some things. A ‘workable editor from scratch’ which wires up all the plugins directly, doing something like example-setup with comments about how it works, might be useful.

1 Like