Skip to content

Conversation

@matthewlipski
Copy link
Collaborator

The last release made block props able to be booleans or numbers, not just strings. While the type definitions for this are all correct, there is an issue when parsing block props. All props are rendered to HTML attributes, so they must be converted to strings. This means when parsing them, we must also figure out whether to parse they should actually be booleans or numbers, which we weren't doing before. E.g. copy/pasting an image would cause the second image's width prop to be a string instead of a number.

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview Oct 9, 2023 7:21pm

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. I think it's smart to add tests for this as this is core functionality

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice that you added the test!

@matthewlipski matthewlipski merged commit 572ee42 into main Oct 11, 2023
@nperez0111 nperez0111 deleted the prop-types-fix branch October 21, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants