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

Only paste as image if payload does not contain text content #652

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

maltesa
Copy link
Contributor

@maltesa maltesa commented Dec 5, 2024

Currently, if you copy text from MS Word into the mdx-editor with the image plugin enabled, the content will be pasted as image. This is because MS Word (at least on a mac) adds the copied selection as plaintext, html, rtf and as image to the systems paste buffer. The Paste Command in the image plugin, intercepted the paste since an image was in the buffer.

This fix only allows the paste command in the image plugin to intercept the pasting if the paste buffer exclusively contains images.

Here is a video comparing the previous and the new behavior:
https://github.com/user-attachments/assets/ccc87ca7-a47d-4c79-9e78-d7d51d37f9de

Copy link

github-actions bot commented Dec 6, 2024

🎉 This PR is included in version 3.20.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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