Blockquote lines merge due to insertNewLineContinueMarkup on Enter

Description

I’m using CodeMirror (Markdown) along with a ProseMirror-based rich text editor.
On Enter key press, CodeMirror uses insertNewLineContinueMarkup for blockquotes and lists.

For example:

> line1

Pressing Enter produces:

> line1
>

Typing continues as:

> line1
> line2


Problem

When this markdown is converted to ProseMirror, it becomes a single blockquote paragraph:

> line1 line2

Structurally, this is incorrect.
To represent separate blockquote paragraphs, the markdown needs to be:

> line1
>
> line2


Expected

When Enter is pressed at the end of a non-empty blockquote line, CodeMirror should insert an empty continued blockquote line (>), so the next line becomes a new blockquote paragraph.

I already do something similar for normal paragraphs by inserting two \ns.


Constraint / Question

I can’t modify or override insertNewLineContinueMarkup, and I couldn’t find documentation for it.

  • Is this behavior intentional?

  • Is there a supported way to customize Enter behavior for blockquotes?

  • Any recommended extension hook or workaround?

This issue affects markdown → rich text conversion by merging blockquote content unintentionally.


The docs for @codemirror/lang-markdown are in the readme.

Yes. Continuing a paragraph on a second line to prevent overlong lines is a thing people do. You can press Enter twice to create a blank line in the quote.

If you want to override the behavior of enter in specific circumstances, you can use another keymap with higher precedence that checks for the situation you want to override, and if it applies, performs your custom behavior and returns true.

Okay. Incase of override happens, will use Prec.
Thanks