Skip to content

Conversation

matthewlipski
Copy link
Collaborator

It's possible to select & copy nested blocks without content from the parent block being selected. ProseMirror still tries to preserve the nesting structure in this case, but because content from the parent block is not selected, it basically violates the schema when creating the Fragment for the selected content. I documented this pretty extensively in the code so recommend checking that out for more details.

@matthewlipski matthewlipski requested a review from YousefED June 26, 2024 21:57
Copy link

vercel bot commented Jun 26, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jun 28, 2024 3:34pm
blocknote-website ✅ Ready (Inspect) Visit Preview Jun 28, 2024 3:34pm

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, and clear comments. Should we specifically also test the use-case from the bug report, which is about list structures? Or does the fact that it's a list not really matter?

@matthewlipski
Copy link
Collaborator Author

Nice, and clear comments. Should we specifically also test the use-case from the bug report, which is about list structures? Or does the fact that it's a list not really matter?

Nah the list items are totally irrelevant here, I think they got specifically reported just because nesting list items is a much more common use case than nesting other types of blocks.

@matthewlipski matthewlipski merged commit 1e742e0 into main Jul 2, 2024
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.

2 participants