We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46165
    • 8 Posts
    I have a client that has an image gallery built in slimbox. I need to add captions to these images and you do that with the title attribute in the <a> tag. I need this to be able to be done in the text editor and not in the html code so my client can make these changes himself. I do not have time to redo all the galleries and put them into a modx gallery type of thing.

    However when I make a change to my link title attribute through the TinyMCE editor my rel="lightbox[name]" attribute disappears. Is there any way I can fix this? I've looked into the site settings and didn't know what to change really. Any help would be greatly appreciated, thanks.
      • 17959 ☆ A M B ☆
      • 57 Posts
      Magnatron [Maarten Wolzak] Reply #2, 12 years, 8 months ago
      You should check the xconfig.js file in the /assets/components/tynimce folder.
      There the valid elements are listed.
      You can look at the TinyMCE website for the syntax: http://www.tinymce.com/wiki.php/configuration:valid_elements

      Hope that helps
        • 46165
        • 8 Posts
        Thank you magnatron, I have looked into that. It would seem as though the "rel" attribute is already in there, do I need to modify the actual xconfig.js file or add a js line of code to the actual page that this is on?
          • 17959 ☆ A M B ☆
          • 57 Posts
          Magnatron [Maarten Wolzak] Reply #4, 12 years, 8 months ago
          I see. Just found that you need to look into the tinymce advlink plugin. This will display the 'Advanced' tab when creating/editing a link.
          In the advanced tab there's a "Relationship page to target" option which you can set to "Lightbox". I think the advlink plugin throws out everything that's not in that list.
          And as you are using a specific lightbox code (rel="lightbox[name]"), advlink throws it out.
          Is there another route you can go? Like using the class attribute? or a comination of the two? E.g. setting the rel to Lightbox and using the class (or target) for specifying which series need to be shown.
            • 46165
            • 8 Posts
            You know what, after trying all this stuff with the advlink I just modified my slimbox code to pull the image caption from the img alt attribute instead. That seems to work fine.