-
-
Notifications
You must be signed in to change notification settings - Fork 740
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
Pasting an image directly from the clipboard in a slate block triggers the creation of both a slate block and a (proper) image block. #5697
Comments
/cc @avoinea @tiberiuichim @ichim-david Does your users not try this feature? I'm so used to do this in Gitlab/Github... |
@sneridagh I think I've noticed this problem at some point. It needs to be fixed. |
Can you attach the screenshots or recording, it will be better for understanding |
@AnshulKahar2729 Go to Google Docs, create a new document using a template that also uses an image. From the google doc, copy everything, go to Volto to a new page, paste the clipboard. If you get two images pasted, it's a problem. |
Ok, I got the problem. I tried to reproduce the problem and it happended. One more question, is it happening in all the blocks, or some specifics? |
@AnshulKahar2729 it's concerning the integration between volto-slate and the volto blocks. The problem is that the image slate node is not properly removed once a volto block is emitted.
volto/packages/volto-slate/src/editor/plugins/Image/deconstruct.js Lines 24 to 27 in 4bb07b9
Somehow the slate tree transformation is not properly done. |
For extra context, I've tried on the demo site to paste an image and it works just fine on a Mac. |
Hey, @ichim-david |
Describe the bug
Pasting an image directly from the clipboard in a slate block triggers the creation of both a slate block and a (proper) image block.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only the image block is created.
The text was updated successfully, but these errors were encountered: