Problem with empty paragraphs

Hey, first of all, thanks for this great piece of work.

I think my problem is exactly the same as this one: How to preserve <br> tags in empty paragraphs

In the document view the empty paragraphs have inside the br tag, but when I get the editor’s content with DOMSerializer, the br tags are gone, which makes imposible to save in the DB the same thing the user is seeing while editing.

Is there any better solution than the workaround included in the thread I mentioned?

My answer to that thread still stands. Those breaks aren’t actually part of the document, they are just needed to it possible to edit empty paragraphs. An idea behind ProseMirror is that you don’t want to save the exact same HTML that is in the editor, but want a structured, cleaned-up document. It is possible to render back the breaks in empty nodes with your own custom serializer or some CSS rule, if you must.

I only had an issue where what was parsed to prosemirror content already had a br, and where the paragraph was empty the minimum height would be different, which I fixed with some css.