Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

iframes getting all discombobulated


Reply


3 Posts   1336 Views

Avatar
senica

Community Member, 18 Posts

21 June 2010 at 4:15pm

I saw quite a few posts on this in the forums but no answer.

Thought I would give it another stab and see if anyone has found the cure.

I'm trying to include a Google Map in the CMS HTML box by pasting the <iframe> code into the HTML box that pops up.

Essentially the code consists of <iframe .....></iframe> When I click insert the map show up. I can click the HTML button again and my code has not changed.

However, when I view the page SilverStripe stops processing the code. It changes <iframe ....></iframe> to <iframe .../> Which really screws things up. In my case, there is an Include template that is not even processed (actually it is but the browser doesn't show it since it doesn't see the iframe as being closed.

When I go back to the cms and click the HTML button, voila! my code look just like always has. TinyMCE is not changing the code, but SS must be changing it on the fly as it includes it.

Any thoughts?

Avatar
TotalNet

Community Member, 181 Posts

21 June 2010 at 5:36pm

I know what you're talking about.

I thought it might have been content negotiation but the editor is putting "junk" in there as soon as I hit save. I've disabled the sapphire MCE cleanup_callback without effect so it could be TinyMCE itself. Perhaps more likely to be the CMS though.

Anyway, not a great fix but ... put a space before the closing tag and it should work. wrap that in a span with style of "display:none;" if it screws up the layout for some reason.

Avatar
Chris Hope

Community Member, 18 Posts

7 May 2011 at 10:19pm

Have a look at http://www.silverstripe.org/general-questions/show/16438 and http://silverstripe.org/general-questions/show/12605?start=8