Iframes in rich text widgets not showing


Everytime I try to put an iframe in the HTML mode of a rich text widget it seems to strip it out. How come?

Hi Sandy,

The rich-text widget parses the HTML code and will format or strip out what it deemed as invalid or unrecognized code. It will also also strip out any empty elements, meaning there is no content present between the opening and closing HTML tags. This is usually the cause of the RTE stripping out iframes. When you paste in your iframe code in the source mode, you can add the HTML encoded non-breaking space in between the opening and closing iframe tags to prevent the element from getting stripped out.

<iframe> </iframe>

Thanks Jon,

I added that and it worked like a charm! I never realised that iframe tags are esstential empty before! Learn something everyday =)

One more thing, when I go back in to edit the html again (of the RT widget), CM1 has added all this in the iframe

&<span id=“jS$6” class=“j2”>amp</span>;<span id=“jS$7” class=“j2”>amp</span>;<span id=“jS$8” class=“j2”>amp</span>;&<span id=“jS$9” class=“j2”>amp</span>;<span id=“jS$10” class=“j3”>lt</span>;<span id=“jS$11” class=“j2”>span</span> <span

it goes on and on for like 100 lines! Just wondering how to prevent this? Seems like a bunch of unessary code?

I have a style on iframes fro my region that is working beautifully. Could that be causing it?


Hi Sandy,

Is this all contained between the opening and closing iframe tags? It appears that TinyMCE (our Rich text editor) automatically encodes certain characters between iframe tags, and may have gotten into a strange encoding loop here. Because the content between iframe tags is only meant for browsers that do not support iframes, try replacing everything that got added in with simple text instead of the HTML space, such as “Your browser does not support iframes”.

Thanks this works great! It doesnt seem to be adding anything now. Mark this one SOLVED =)

Excellent, glad to hear it!