TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.31k stars 431 forks source link

Empty paragraphs are being removed #986

Open nchanged opened 1 month ago

nchanged commented 1 month ago

Describe the bug Empty paragraphs are being removed, Which is sometimes crucial for the formatting of the text.

To Reproduce

Load the following content

<p class="bn-inline-content">asdfasdf</p><p class="bn-inline-content">asd</p><p class="bn-inline-content">f</p><p class="bn-inline-content">asdf</p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p><p class="bn-inline-content"></p>

Will result in not preserving the empty lines

Is there a hidden option or something? Thanks!

aespinoza96 commented 1 month ago

Did you try by adding like a blank space? I know it is not the optimal solution but it might be a workaround

nchanged commented 4 weeks ago

that doesn't sound a look a good idea. The formatting will be inconsistent when loading new docs, or if the user just inserts a new line 2 times.