#11110 closed Bug (fixed)
Image2: iframes/flashes are converted into image2 widgets when pasted
Reported by: | Marek Lewandowski | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.3 |
Component: | General | Version: | 4.3 |
Keywords: | Cc: |
Description (last modified by )
Image2: iframes/flashes are converted into image2 widgets when pasted
since: 4.3 until major
It seems that currently enabling image2 plugin will convert iframes/flashes into its widget.
- open image2 sample (/samples/plugins/image2/image2.html)
- switch to source mode
- input following code
<p>n t<iframe frameborder="0" scrolling="no" src="www.wikipedia.org"></iframe>e d</p>
- switch back to wysiwyg mode
- ctrl+a (select all)
- ctrl+c (copy)
- move cursor at the end of content
- ctrl+p (paste)
Expected result:
Pasted content should contain iframe.
Produced source code:
<p>n t<iframe frameborder="0" scrolling="no" src="www.wikipedia.org"></iframe>e dn t<iframe frameborder="0" scrolling="no" src="www.wikipedia.org"></iframe>e d</p>
Current result:
Pasted content contain image2 instead of an iframe.
Code with image:
<p>n t<iframe frameborder="0" scrolling="no" src="www.wikipedia.org"></iframe>e dn t<img alt="IFrame" src="http://presets.ckeditor.dev/4.3/full-all/ckeditor/plugins/fakeobjects/images/spacer.gif?t=DA89" title="IFrame" />e d</p>
additional info:
- issue does not occur for other widget-based plugins like mathjax, placeholder
- issue seems to be cross browser
Change History (8)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Milestone: | → CKEditor 4.3 |
---|---|
Owner: | set to Piotrek Koszuliński |
Status: | confirmed → assigned |
comment:3 Changed 11 years ago by
Status: | assigned → review |
---|
comment:5 Changed 11 years ago by
Status: | review_failed → review |
---|
It turned out that fakeobjects does not allow HTML which it requires, so when there is no image plugin (which allows all classes), the cke_iframe class was stripped.
I pushed the easiest fix for that I could think of - we just allow all important properties on images with data-cke-realelement attributes. It's not ideal, because ideally we should be more precise (and filter the real element's HTML), but fakeobjects is kind of old-school plugin, so we can accept this solution.
The dev changes should not have impact on editor's behaviour, however, may have on tests.
comment:6 Changed 11 years ago by
Status: | review → review_passed |
---|
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:bfd103821 on dev and 358db53 + 9fdbc07 on tests.
comment:8 Changed 7 years ago by
Description: | modified (diff) |
---|
Pushed t/11110 on dev and tests.