We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    Hi all,

    I am aware that there are similar posts like this out there but trying the resolutions on them hasnt worked for me.

    Basically my issue is this: I paste the embed code for a YouTuvbe video on my page in 'html mode', turning TimyMCE off. I save and this works fine. However, if I go back to edit the page in html mode the iframe disappears.

    So far i have tried adjusting the TinyMCE script to have:
    var mce_extended_valid_elements = "iframe[src|width|height|name|align]"; (do those attributes need to be in a particular order?)

    And disabling the post security in my .htaccess file, both to now avail.

    Any advice would be appreciated! Thanks
      • 36404
      • 307 Posts
      hi,

      i've triied adding
      iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]

      into the mce_valid_elements var (in assets/plugins/tinymce/js/xconfig.js) and it works without any problem, works too when i add it to mce_extended_valid_elements var

      i do all this directly in the js file, a liitle simpler, faster and more reliable
      i've tried with a youtube video to see if there were any peculiar issue with those, nope, works like a charm
      your problem may come from the fact you haven't included frameborder in you snippet when youtube uses it for their embedding code, grab the whole stuff i wrote above, you shouldn't have problem any more

      have swing
        réfléchir avant d'agir