Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: custom numbered list resets incorrectly when parsing markdown and html to blocks #1366

Open
sadry-em opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sadry-em
Copy link

Issue
The blocknote content is stored as markdown for later reuse by users.
When a numbered list starts at number higher than 1, when storing the markdown it is done correctly.
But when parsing the markdown or even the html, the editor removes the custom numbering and connects both lists and continues the numbering incorrectly as shown in the screenshot. Is there any way to avoid that behavior ?
It completely messes up documents and misleads users.

To Reproduce
In the editor create an ordered list:

  1. Some text

  2. Some text

  3. Some text

  4. Final text

The generated markdown would correctly be:
`1. Some text
2. Some text

  1. Some text
  2. Final text`

When parsing this in the editor you get back:

  1. Some text
  2. Some text
  3. Some text
  4. Final text
Screenshot 2025-01-13 at 13 24 41 Screenshot 2025-01-13 at 13 26 08

Misc

  • NextJs version: "15.0.3",
  • "@blocknote/core": "^0.22.0",
  • "@blocknote/mantine": "^0.22.0",
  • "@blocknote/react": "^0.22.0",
  • "@blocknote/shadcn": "^0.22.0",
  • Package manager: bun
  • Browser: Chrome v.131

Thanks for looking into this :)

@sadry-em sadry-em added the bug Something isn't working label Jan 13, 2025
@sadry-em sadry-em changed the title Issue: custom numbered list start when parsing markdown and html to blocks Issue: custom numbered list resets incorrectly when parsing markdown and html to blocks Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant