ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.38k stars 3.68k forks source link

Editing external image via CKBox editing changes current image and reinserts it at the same time #17056

Closed f1ames closed 1 week ago

f1ames commented 2 weeks ago

šŸ“ Provide detailed reproduction steps (if any)

  1. Go to full featured demo https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html.
  2. Set editor HTML to (via e.g. source mode):
    <h2 class="document-title" id="ec24b0e365a7ffc9b5918f9f23af2fc87">
    Handheld emperor
    </h2>
    <p>
    Nintendo, a Japanese electronics company, started as a <a href="https://en.wikipedia.org/wiki/Hanafuda"><i>hanafuda</i> cards</a> manufacturer in 1889. In the mid-1970s, they entered the early video games market and became famous for their home video and handheld game consoles. Nintendo introduced consoles like the <strong>NES</strong>, <strong>SNES</strong>, and <strong>Wii</strong>. But the most revolutionary was for sure the <strong>Game Boy</strong>.
    </p>
    <h3 class="document-subtitle" id="eb498c56ecda85e445e86add04718a7e2">
    A countdown of Nintendo handhelds
    </h3>
    <p>
    <img src="https://ckeditor.com/docs/ckeditor5/latest/assets/img/features-collaboration.png">
    </p>
  3. Focus image and press edit button in its' toolbar.
  4. Do some editing and "Apply".

āœ”ļø Expected result

I would expect to have one image with my edits applied.

āŒ Actual result

I end up with 2 images in the editor:

https://github.com/user-attachments/assets/10dfc5d5-3d1e-4905-81e9-dd0a22d8c913

ā“ Possible solution

...

šŸ“ƒ Other details


If you'd like to see this fixed sooner, add a šŸ‘ reaction to this post.

Mati365 commented 1 week ago

@f1ames I checked this issue and ckbox used insertImage command that tried to insert block image in place of inline image. After adjusting ckbox command options to smarter deduce if user selected inline image and it looks like it works.