Iframes in CMS Builer issues

9 posts by 3 authors in: Forums > CMS Builder
Last Post: January 10, 2019   (RSS)

By osga - November 26, 2018

im trying to paste a piece of iframe code into the cms html editor, but as  soon as I hit "OK", without even "saving" the article yet, cms changes the style code in the iframe, from what you see in the first line of code, to what you see in the second...any thoughts?

what i insert:
<div align="center"><iframe allowtransparency="true" src="http://website/img" style=“width: 100%; max-width: 468px;” marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe></div>

what it turns into:
<div align="center"><iframe width="300" height="150" allowtransparency="true" src="http://website/img" 100="" max-width:="" 468px="" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe></div>

By Dave - November 26, 2018

Hi Osga, 

It looks like some curly quotes might have accidentally got in the code.  Try replacing this

style=“width: 100%; max-width: 468px;”

With this:

style="width: 100%; max-width: 468px;"

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com

By osga - November 27, 2018 - edited: November 27, 2018

ok well that helped (which is hysterical), but another question is why does the editor keep forcing a width="xx" and height="xx" into the iframe code even after i keep deleting it?

<div align="center"><iframe width="300" height="150" style="width: 100%; max-width: 468px;" allowtransparency="true" src="http:website.com/img" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe></div>

the whole point of the excersize is to make the iframe "responsive" so the img shrinks for phones etc, not to push pages wide...

By Dave - November 28, 2018

Hi Osga, 

I tried upgrading the TinyMCE WYSIWYG component we use and that seemed to fix the issue.

Can you try renaming your /cmsb/3rdParty/TinyMCE4/ folder to /cmsb/3rdParty/TinyMCE4_old/ and replacing it with the contents of the attached zip?

Let me know if that works for you.  Thanks!

Dave Edis - Senior Developer
interactivetools.com
Attachments:

TinyMCE4.zip 1159K

By osga - November 29, 2018

ok... lol.. here we go...

that seemed to help, but for your own reference, only in Safari on the Mac so far.

Firefox on Mac, the code still got altered

Chrome on PC, still got altered

We also noticed that the iframe gets handled as Embeded Media by the editor, could that have something to do with the issue?

By Codee - January 9, 2019

Was this resolved?

By Dave - January 9, 2019

Equinox, yes.  We updated the tinymce component in the latest release and that resolved it.

Dave Edis - Senior Developer
interactivetools.com

By Codee - January 10, 2019

Perfect. Thanks, Dave.