Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mark 5 posts 7 karma points
    Jun 29, 2009 @ 20:45
    mark
    0

    TinyMCE Woes...

    I'm trying to enable iframe tags in tinyMCE v3 RTE. I know they're not enabled by default.

    I added iframe to the valid_elements config file for tinyMCE, and this worked great. However, today, it stopped working for no (apparent) reason. Now, whenever someone tries to add an iframe tag via the RTE HTML mode, it shows up, but the minute you click save or publish, it disappears. I've tried removing, re-adding it from the config file. Also bouncing IIS. Nothing.

    Any ideas?

    We're using V4 of Umbraco.

    Thanks!

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    Jun 30, 2009 @ 00:40
    Peter Gregory
    1

    It is unlikely that a feature or a change would revert for no reason.  Has something changed in your configuration eg did you recently upgrade your umbraco installation or has your config file been reverted to an older version?

  • mark 5 posts 7 karma points
    Jun 30, 2009 @ 06:45
    mark
    0

    I agree - its unlikely something would change for no reason. But no upgrades have been done, and the config file is the same version....

  • mark 5 posts 7 karma points
    Jun 30, 2009 @ 12:05
    mark
    1

    Figured this out. Absolutely nothing wrong with TinyMCE - its simply a usability quirk. TinyMCE won't allow empty tags, so if you put in <iframe src="xxx"></iframe> it simply removes it. You have to add something like No Frames text between the tags and then it works fine!

    Do'h!

  • Neil Gibbons 144 posts 61 karma points
    Aug 30, 2009 @ 18:38
    Neil Gibbons
    0

    I tried both of these ... added iframe to the TinyMCS config and tried adding text inbetween <iframe></iframe> tags ... still no joy!

    I can see the IFRAME in the editor window, but as soon as I save/publish, it goes!

     

    Help!

  • Simon Justesen 436 posts 203 karma points
    Aug 30, 2009 @ 22:21
    Simon Justesen
    0

    Untested, but try adding iframe and it's attributes under the ValidElements node in /config/tinymceSettings.config

    HTH,
    Simon

  • Neil Gibbons 144 posts 61 karma points
    Aug 31, 2009 @ 11:48
    Neil Gibbons
    0

    Thanks Simon,

    I had tried your suggestion, added the following:

    iframe[width|height|src|frameborder|scrolling|marginheight|marginwidth]

    Now this does allow the IFRAME tab to be added into TinyMCE itself - I copied and pasted into the HTML view and after clicking "update" the IFRAME was still in the WYSIWYG editor. However when you click save - it disappears!

    I tried Mark's suggestion, but even adding text inbetween <iframe></iframe> tags doesn't work. Somthing else is removing my tags! I know I could use a macro to construct this but I'd prefer to to provide flexibility via the RTE rather than have to decorate my templates with macros for what is simply content.

    Using Umbraco 4.0.2.1.

     

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Aug 31, 2009 @ 12:19
    Peter Dijksterhuis
    0

    Did you restart the application after you changed the tinymcesettings? (You can restart it by touching the web.config). If you didn't, the changes do not take effect.

    Alternatively, you can disable the checking by editing the umbracoSettings.config and setting TidyEditorContent to false. (remember to restart the application after you make the changes).

    HTH,

    Peter

  • Njal 10 posts 31 karma points
    Feb 03, 2011 @ 21:05
    Njal
    0

    Adding iframe[width|height|src|frameborder|scrolling|marginheight|marginwidth]] (no spaces!) to tinyMceConfig.configand iisrestart worked like a charm in Umbraco 4.6.1! Thanks!

    -N

  • kukuwka 75 posts 96 karma points
    Feb 21, 2011 @ 14:40
    kukuwka
    0

    Hi Njal,

    Where did you add this in umbracoSettings.config ?

    Thanks,

    kukuwka

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 21, 2011 @ 14:42
    Tom Fulton
    0

    I think he meant in tinyMceConfig.config, in the validElements section :)

  • Njal 10 posts 31 karma points
    Feb 21, 2011 @ 14:43
    Njal
    0

    Yep - tinyMceConfig.config !

  • Carlos Casalicchio 176 posts 735 karma points
    Feb 21, 2011 @ 18:48
    Carlos Casalicchio
    0

    I've added the string to the configuration file but it's still not showing up. Since I don't have access to do a full IISRESET (Godaddy shared hosting) I've recycled the application pool, is that enough?

    <validElements>
    <![CDATA[+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
    ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],
    -strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,
    img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel],
    -sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],
    -tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
    thead[id|class],tfoot[id|class],-td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
    -th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],
    -span[class|align],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align],-h2[id|dir|class|align],
    -h3[id|dir|class|align],-h4[id|dir|class|align],-h5[id|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],
    dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[classid|width|height|codebase|*],
    param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button,iframe[width|height|src|frameborder|scrolling|marginheight|marginwidth]]]>
    </validElements>

    Does anyone know what I'm doing wrong?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 21, 2011 @ 18:50
    Jan Skovgaard
    0

    Hi Carlos

    That should be enough. But perhaps you could also try to touch the web.config to see if that helps?

    /Jan

  • Carlos Casalicchio 176 posts 735 karma points
    Feb 21, 2011 @ 18:54
    Carlos Casalicchio
    0

    Jan,

    Thanks... but no luck :(

    Do you know of any other tricks or workarounds i can use?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Feb 21, 2011 @ 18:56
    Tom Fulton
    0

    Personally I've never had any luck getting iframes to insert in TinyMCE.  Kind of surprised Njal got it working.  Are you using 4.6.1 like he is?

    I always just use a generic macro like "Insert IFrame" and add parameters like URL, frameborder, width, height, etc and allow it to be used in the editor.  Not sure if that is an option for you or not..

    -Tom

  • Eran Meir 401 posts 543 karma points
    Mar 05, 2011 @ 19:33
    Eran Meir
    0

    i've tryed that also, didn't work. using 4.5.2

  • jc 64 posts 101 karma points
    Mar 14, 2011 @ 19:24
    jc
    0

    Try adding something inside your iframe tags so it doesn't get collapsed:

    <iframe src="http://www.google.com">Your browser does not support IFRAME</iframe>
  • Bluegrass Digital 17 posts 68 karma points
    May 23, 2011 @ 15:04
    Bluegrass Digital
    1

    Your code looks wrong though Carlos... You have one too many brackets on the end and missing the one after 'button'

    You have:

    bdo,button,iframe[width|height|src|frameborder|scrolling|marginheight|marginwidth]]]>

     

    You should have:

    bdo,button],iframe[width|height|src|frameborder|scrolling|marginheight|marginwidth]]>

     

     

  • Anders Brohäll 295 posts 561 karma points c-trib
    May 11, 2012 @ 12:34
    Anders Brohäll
    0

    Ive got the same problem on a v4.0.2.1
    The string should end with three brackets as the pasted code has, you've got two in the CDATA, and one in iframe-attributes. 

    Did you guys solve this?

  • Anders Brohäll 295 posts 561 karma points c-trib
    May 11, 2012 @ 12:37
    Anders Brohäll
    0

    Works when turning off Tidy in umbracoSettings.config

    <TidyEditorContent>False</TidyEditorContent>

  • Connie DeCinko 931 posts 1160 karma points
    Aug 14, 2012 @ 17:49
    Connie DeCinko
    0

    Bottom line, the version of TinyMCE/Tidy that ships with Umbraco is broken by not allowing iframes even though they are allowed in the TinyMCE config.  Tidy should not be stripping out the empty iframe tag.  And, TinyMCE should not be removing content inside the iframe tag, which is your no frames content.

Please Sign in or register to post replies

Write your reply to:

Draft