Using CKEditor 4.3.
I can't seem to get an iFrame to show up properly. I'm using the inline editor and always just get a white box with 'IFRAME' text in the center in red (in a small white box with red border).
Here is a sample of the DOM when using http://www.google.com as the src.
<img class="cke_iframe" align="" data-cke-realelement="%3Ciframe%20src%3D%22http%3A%2F%2Fwww.google.com%22%20frameborder%3D%221%22%20scrolling%3D%22no%22%3E%3C%2Fiframe%3E" data-cke-real-node-type="1" alt="IFrame" title="IFrame" src="http://localhost:8181/blade-core-js/js/3rdParty/ckeditor/plugins/fakeobjects/images/spacer.gif?t=DAED" data-cke-real-element-type="iframe" data-cke-resizable="true">
That's how the iframe plugin
That's how the iframe plugin works. It inserts a placeholder (image), but when you get data from CKEditor that placeholder is transformed to the <iframe> element. Why does iframe plugin work this way? Because real iframe displayed inside contenteditable element would be unusable. You would be able to click links inside it, select text, etc. At least that's how it looked like when iframe plugin was created. Currently, thanks to the Widget system introduced in CKEditor 4.3, it'd be possible to create better iframe plugin, which renders iframe content, but is still usable inside editor.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
So... if I understand what
So... if I understand what you said, the iFrame wont' work inside of the editor, period? You would have to extract the content and insert it into a non-CKEditor DOM element,unless I go the 'Widget' System route?
So... if I understand what
Inside editor iframe will be replaced with placeholder.
Hmm... Not sure if I understand. I meant that when you'll load data retrieved (saved) from editor on the normal page, the iframe will be rendered correctly. Check out what CKEditor produces by switching to source mode - you'll see normal <iframe> tag there.
Widgets make it possible to load real iframe inside editor. However, new iframe plugin would have to be implemented.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
I appreciate the help.
I appreciate the help.
What I can do is destroy the editor and update the element containing the editor by setting it's HTML to the editor's getData.
Sort of like the example here: ckeditor/samples/ajax.html