We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31821
    • 3 Posts
    Hi all,
    First some praise for MODx: I a relatively new user, but I am hooked to this wonderful CMS- many thanks to the MODx developers for a superb product!!

    Now -- I would need some help from the more experienced users:
    I’m trying to embed a Flickr slideshow in a website using ’iframe’ tags. I am able to paste the code in, but TinyMCE repeatedly drops the code when I save the page in MODx... I’m noticing that ’script’ tags get the same treatment.

    Can anyone help me set up TinyMCE so that it allows for ’iframe’ and ’script’ tags? I found some posts about this issue on TinyMCE’s forums, but it seems MODx has a very particular way of embedding TinyMCE -- so I can’t figure it out. I tried messing with the xconfig.js file in the TinyMCE plug-in folder in MODx’s assets, but with no success..

    I’m using MODx 1.0 Evolution, which I believe comes bundled with TinyMCE 3.2

    Note: I got it to work by disabling TinyMCE, but I need TinyMCE to be enabled in order for our very non-tech-oriented web maintenance person to update the content. This is the page: http://www.ctvnetwork.org/schurz-fall2009.html

    Any help is much appreciated!
      • 26931
      • 2,314 Posts
      Hi vr,

      you could place the iframe-code in a chunk -> http://modxcms.com/forums/index.php/topic,42247.msg253387.html#msg253387
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Anything that you don’t want TinyMCE to mess with (complex snippet calls with lots of parameters, iframes, javascript etc) can go in chunks or TVs. Then all Tiny sees are the chunk tags {{MyChunk}}, which it doesn’t do anything to.

        This has the added advantage of making it more difficult for your non-technical editors to break the page wink
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 31821
          • 3 Posts
          Thanks sharkbait and sottwell! I think this is all I need. It would be nice to have Tiny natively support <iframe> and <script> tags, but chunks do the job nicely.
          I still don’t know how to use TV’s, so learning that will be a project for me -- to be explored in the upcoming weeks... smiley
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You might be able to get away with setting the "cleanup" field in the TinyMCE plugin’s configuration to "disabled". There is also the tinymce_extended_valid_elements parameter that can be used in the plugin configuration "custom parameters" field.
            http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/extended_valid_elements
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 31821
              • 3 Posts
              Susan - thanks so much for your help!
              Also - the tutorials and templates on your website are great! I’ll go thorough them the first chance I get.
                • 21800
                • 174 Posts
                @ sottwell

                I was so glad to read this hint with the chunk, but for me, with modx 1.02 and TinyMCE 3.2.4.1, TinyMCE includes the {{chunk}} with the <p> tag within the "content" (not within a template). I think this shouldn’t be (or?).
                  • 5340
                  • 1,624 Posts
                  Click on the Html Button and change p to div
                    • 17548
                    • 74 Posts
                    TinyMCE has a parameter called "extended_valid_elements" which apparently lets you customize the internal filters.

                    http://www.learnwebdesignonline.com/tutorials/allow-script-iframe-tinymce has instructions for Joomla.

                    I haven’t figured out the modxcms solution, so I’m all ears and will probably post a separate thread.
                      • 19604 ☆ A M B ☆
                      • 179 Posts
                      Quote from: lowelife at Sep 23, 2010, 02:32 PM

                      ... has instructions for Joomla.

                      Brr, you said the J-word! I was instantly reminded of endless nights spent in front of my screen banging my head on the table. Bad memories, very bad memories ...

                      cya
                      Oliver [ed. note: mindeffects last edited this post 13 years, 8 months ago.]
                        MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
                        http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver