I’m using ProseMirror with a very basic schema:
- A document node that only accepts inline elements (no paragraphs)
- Hard breaks (i.e.,
Enteris tweaked to insert line breaks
- And text nodes, of course
The idea here is to have plain-text editor augmented with extensions such as mentions (which are also inline elements).
However, I’m having an issue when I paste HTML content (for instance, copying code from VS Code and pasting into a ProseMirror editor). The content is pasted succesfully, but line breaks are ignored and the text is pasted into a single line.
What’s the best way to work around this? What’s the best event handler for this? Would love some pointers in the right direction, as I’m a bit clueless.