Skip to content

Conversation

matthewlipski
Copy link
Collaborator

This PR adds the data- attributes rendered based on a block's props to content of the block after stripping the block structure in blocksToHTMLLossy. This is to reduce the amount of data lost when using this function.

Closes #1050

Copy link

vercel bot commented Sep 12, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Sep 13, 2024 3:47pm
blocknote-website ✅ Ready (Inspect) Visit Preview Sep 13, 2024 3:47pm

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.

Looks like a great improvement!

I think at some point we could either supply a stylesheet which uses the data attributes, or maybe consider setting certain properties on style attributes, but for now this solves the main issue

@matthewlipski matthewlipski merged commit 6f66926 into main Sep 13, 2024
3 of 4 checks passed
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.

Feedback for “Converting Blocks to HTML”

2 participants