Skip to content

fix: External file drag/drop and copy/paste #1052

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

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

matthewlipski
Copy link
Collaborator

This PR fixes 2 issues with dropping and pasting external files into the editor.

First, the files are now always inserted as new blocks instead of updating existing ones, and also dropping has been fixed to use the block under the mouse cursor instead of the currently selected one.

Second, using file extensions in a file block's fileBlockAcceptMimeTypes was throwing errors before, and is now fixed. File extensions and MIME types are now checked independently, whereas before, file extensions were just treated as MIME types causing some logic to fail.

Copy link

vercel bot commented Sep 6, 2024

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Sep 6, 2024 1:16pm
blocknote-website ✅ Ready (Inspect) Visit Preview Sep 6, 2024 1:16pm

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, some minor suggestions

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