-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Bug]: Inserting image from clip board not working #3941
Comments
@sebastian-walter in this case you need to configure "Image" extension to render image node inline. See documentation.
Try here: https://codesandbox.io/s/cranky-hellman-t9fu9x?file=/src/App.js |
Thanks for the response! So when I understand correctly, I would have to write my own extension that parses html like this (see snippet below) and splits that up in a paragraph, an image, and another paragraph since otherwise, it is being ignored since there is no inline image in the schema? I would have expected this to behave like the Notion editor, where this is possible and handled in that way.
|
You do not need to write your own extension. Just configure the image extension as shown above and it will work as expected. |
hi @svenadlung, quick question, maybe you can help me with that. When I try to paste an image on a new row in the codepen you provided, I see an extra space right after it (please see screenshot) It appears after adding
|
Thanks a lot for your information, in the documtion, it mentioned:
And yeah, I am migrating from Quill, and I did met the issue the paste images were missing when editing contents contributed by quill editor, adding |
Which packages did you experience the bug in?
extension-image
What Tiptap version are you using?
2.0.0
What’s the bug you are facing?
When inserting image, it only works if the image is the first item. When e.g. pasting from clip board with the following structure:
Only the text are being inserted correctly, the image not.
What browser are you using?
Chrome
Code example
https://tiptap.dev/api/nodes/image
What did you expect to happen?
I copied the first comment from this thread including images: d3/d3-hierarchy#91
I expected the images to appear as well. Instead the image only appeared when I started the selection with the image.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: