Opened 8 years ago
Last modified 7 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
- Load CKEditor with the image2 widget and for easier testing
config.allowedContent = true;
- In the content add
<p><span style="border:2px solid red; padding: 10px">A span</span></p>
and an inline image (without caption)
- 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 8 years ago by
comment:2 Changed 8 years ago by
Status: | new → pending |
---|
Failed to reproduce. Where is the image placed exactly after you add it?
comment:3 Changed 8 years ago by
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 8 years ago by
Status: | pending → confirmed |
---|---|
Version: | 4.5.11 → 4.0 |
This example was very helpful, thank you.
comment:5 Changed 8 years ago by
It also splits span when copy/paste into span, in Firefox browser. You can verify it with above example.
comment:6 Changed 7 years ago by
Type: | Bug → New Feature |
---|---|
Version: | 4.0 → 4.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: 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.