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
5.9k stars 384 forks source link

`replaceBlocks` is removing the space between brackets for checklists #834

Closed TheMikeyRoss closed 2 weeks ago

TheMikeyRoss commented 3 weeks ago

Describe the bug the method replaceBlocks is removing the space between the brackets of a checklist which should cause it to render an actual interactive checkbox.

To Reproduce This issue is broken down in this thread https://github.com/TypeCellOS/BlockNote/issues/826#issuecomment-2162085998

Misc

zaaakher commented 3 weeks ago

It seems the \ escape is the culprit here

blocknote-escape-checklist

zaaakher commented 3 weeks ago

It seems blocksToMarkdownLossy is adding the \ escape before the brackets. blocknote-escape-checklist-cause

@TheMikeyRoss Just to confirm, are you using blocksToMarkdownLossy to convert the blocks to markdown before you upload them to your DB?

TheMikeyRoss commented 3 weeks ago

are you using blocksToMarkdownLossy to convert the blocks to markdown

@zaaakher Yes exactly!