Remove the <br> that inside the empty ProseMirror view at the initial rendering

I recently started using ProseMirror and I found an issue: when rendering an empty ProseMirror view, there is an internal <br class="ProseMirror-trailingBreak">. I looked at the content in New nodes without br - #2 by marijn, but it was from about 7 years ago, so I’m not sure if there is a better solution today. Now with React, we can return a <div contentEditable></div>, and the browser can render it normally. The <br> only appears inside when the mouse clicks on this element. So I’m wondering if ProseMirror can also work like this, which would make the initial rendering look cleaner.

This is not an issue. This is intentional behavior. The <br> tag helps browsers behave well when editing empty elements. It’s not part of the document, just of the editable rendering in the editor view.

Thank you for your reply, I still know less about browsers, by learning afterward maybe I can understand this better.