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

Allow pasting an image from the clipboard #2265

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

julien-nc
Copy link
Member

@julien-nc julien-nc commented Mar 30, 2022

Let's include that in the image drag'n'drop #2264

This handles the case in which the paste event also contains some text (like when the image is copied from the EyeOfGnome image viewer). The text is ignored and not pasted.

The logic is to catch the event in the Image prosemirror plugin, prevent it and dispatch a bubbled custom one for the editor wrapper which performs the upload.

This could alternatively be done anywhere else, in any other Node, we could extend the Text one for example.

@julien-nc
Copy link
Member Author

/compile amend

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@julien-nc julien-nc merged commit 6c444cd into enh/image-drag-n-drop Mar 31, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/image-paste branch March 31, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants