Opened 11 years ago
Closed 10 years ago
#12038 closed Bug (invalid)
Method insertElement should be aware of Blink bug
Reported by: | Jakub Ś | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | Blink | Cc: |
Description
Currently when you have image with relative path in contenteditable element and decide to copy paste it you will see image path being converted to absolute one. Some users may not like it.
This is not a problem in CKEditor most of the times when you copy paste images that are in editor. CKEditor uses data-cke-saved-src
custom attribute which deals with this Blink bug. There is however one specific case.
- Use below code to insert image into editor
var value = "<img src ="../ball.jpg" style="width:100px" />'; var element = CKEDITOR.dom.element.createFromHtml(value); editor.insertElement( element );
- Copy/paste image next to existing one.
- Get editor data.
Result: Path is src attribute is changed because data-cke-saved-src
is not used in this case.
Proposed solution: Insert element could be made aware of this issue and insert data-cke-saved-src
when it deals with images on Blink browsers.
Change History (2)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | confirmed → closed |
This can be done, but this is not what insertElement should do. There's a pretty big difference between insertHtml and insertElement that the former uses the HTML data processor, while the latter does not, because it cannot. HTML data processor works on HTML strings so it would require ugly hacks to use it inside insertElement. And all those filters like converting
src
todata-cke-saved-src
are implemented as HTML DP's filters.