mdx-editor / editor

A rich text editor React component for markdown
https://mdxeditor.dev
MIT License
1.75k stars 139 forks source link

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

Closed rissois closed 1 month ago

rissois commented 1 month ago
  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 commented 1 month ago

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.

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 3.9.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

rissois commented 1 month ago

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