Opened 7 years ago

Last modified 6 years ago

#14900 confirmed New Feature

Drop of inline widget in a span, splits the span in two

Reported by: Alfonso Martínez de Lizarrondo Owned by:
Priority: Normal Milestone:
Component: UI : Widgets Version: 4.5.0
Keywords: Cc:

Description

Steps to reproduce

  1. Load CKEditor with the image2 widget and for easier testing
    config.allowedContent = true;
    

  1. In the content add
<p><span style="border:2px solid red; padding: 10px">A span</span></p>

and an inline image (without caption)

  1. In design mode drag the image into the span

Expected result

The image is shown now inside the span

Actual result

The span is split in two and the image (widget) is placed between the two spans

<p><span style="border:2px solid red; padding: 10px">A </span><img alt="" src="/userfiles/dnv.png"><span style="border:2px solid red; padding: 10px">span</span></p>

Other details (browser, OS, CKEditor version, installed plugins)

Of course this happens with any other inline widget If the image is placed in source mode inside span then it works correctly and you can also drag the image from one position to another inside the span without problems

Change History (6)

comment:1 Changed 7 years ago by Alfonso Martínez de Lizarrondo

Note: Edge shows a "no drop" icon in this test, but I'm not gonna bother to file a ticket here. You might want to check it better but I would guess that it's a MS bug.

comment:2 Changed 7 years ago by Tade0

Status: newpending

Failed to reproduce. Where is the image placed exactly after you add it?

comment:3 Changed 7 years ago by Alfonso Martínez de Lizarrondo

testcase: http://www.martinezdelizarrondo.com/bugs/ckeditor14900.html

(note: the preview says that I'm changing the priority to "must have", but I didn't change anything. I'll use the "revert" but other day I might not notice this problem)

comment:4 Changed 7 years ago by Tade0

Status: pendingconfirmed
Version: 4.5.114.0

This example was very helpful, thank you.

comment:5 Changed 7 years ago by Khanh Le

It also splits span when copy/paste into span, in Firefox browser. You can verify it with above example.

comment:6 Changed 6 years ago by Jakub Ś

Type: BugNew Feature
Version: 4.04.5.0

This is how it works by design. Dropped inline widget retians its structure. If we were to wrap the widget by default with formatting then its formatting changes - this is something that is unexpected.

What we could do is introduce a configuration setting e.g. widgetDefinition.inheritStyles but this makes it a feature request.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy