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.
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?
-
☆ A M B ☆
- 57 Posts
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.
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.