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

Fix: prevent file system D&D, C&P, upload if no uploadImageHandler #549

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

rissois
Copy link
Contributor

@rissois rissois commented Jul 23, 2024

  1. ImageDialog now properly accepts links using a hidden input.
  2. Fixed drag-and-drop plus copy-and-paste by taking advantage of differences in DataTransferItemList type (see attached PDF)
  3. Removed imageUploadHandler on ImageWithNoBackend example

MDXEditor_data_types_and_call_sequence.pdf

@petyosi petyosi merged commit 71daa82 into mdx-editor:main Jul 24, 2024
@petyosi
Copy link
Contributor

petyosi commented Jul 24, 2024

That's great! Thank you for digging into it. I also added a tiny change that fixes the problem you mentioned about dragging images from the web resulting in width=0 height=0 images.

Copy link

🎉 This PR is included in version 3.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rissois
Copy link
Contributor Author

rissois commented Jul 24, 2024

Awesome, thanks! Happy to help on such an great project!

basile-parent pushed a commit to basile-parent/mdxeditor-fork that referenced this pull request Jul 24, 2024
…dx-editor#549)

* Removed uploadImageHandler from ImageWithNoBackend example

* Drag and paste, block file system but allow web

* Allow ImageDialog to accept links

* fix: drag and drop of images from the web

---------

Co-authored-by: Petyo Ivanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants