-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
When only using block level images, insertcontent-invalid-insertion-position in console on paste of HTML #16321
Comments
Hello, thank you for reporting and providing a sample repo. Unfortunately, I wasn't able to reproduce the issue - see the recording below. Screen.Recording.2024-05-20.at.13.38.55.movIt would be best if you are able to also send a recording showing the exact use case, so showing the source you are copying the content from, and the editor state when you are pasting it. |
recording.webmI am dragging the content that is in the reproduction page into the editor. |
Thank you, I can reproduce the problem and will investigate it. |
Issue details:
I added a failing unit test and images to the |
📝 Provide detailed reproduction steps (if any)
Reproduction repo
Have an editor with only the folowing plugins:
[
Essentials,
ImageBlock,
Paragraph,
Undo
]
Paste html looking like:
<img><br><img>
or
<img>CK<img>
Clipboard contents on moment of pasting:
✔️ Expected result
HTML gets pasted and is rendered properly
❌ Actual result
nothing is pasted, insertcontent-invalid-insertion-position error in the console, coming from here :
ckeditor5/packages/ckeditor5-engine/src/model/utils/insertcontent.ts
Line 362 in 04a8c63
❓ Possible solution
unfocusing the editor after this reproduction fixes the rendering somehow.
📃 Other details
Essentials,
ImageBlock,
Paragraph,
Undo
]
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: