Closed (fixed)
Project:
Tiny Tiny MCE
Version:
6.x-1.7
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2008 at 12:39 UTC
Updated:
12 Aug 2008 at 08:32 UTC
hello,
I enterend lightbox tags with the source part of TinyTiny.
Then
<a href="link" rel="lightbox"><img src="link"></a>
becomes
<a href="link"><img src="link"></a>
What to do? :-O
Thanks!
Comments
Comment #1
pieter333 commentedI have the same problem. I used the advlink plugin in tinymce, so you can define styles or classes to a hyperlink. If I fillin a style for example "background:red" and I click update, the background of the link is indeed red in the TinyMCE editor. But if I click the SOURCE HTML button of tiny then the style isn't added. If I click on the hyperlink and than the hyperlink button the style is still set though.
If I save the node, the style is not saved.
Also as above if I add rel="external" of class="foo" trough the html source button as soon as I click UPDATE and click the html source button again it is gone.
Comment #2
Steve Lockwood commentedTinyMCE strips out any attributes which are not defined in its init script. The trick, I think is to get the right settings in the tinymce init script. This is defined in admin/settings/tinytinymce.
If you alter TinyMCE init script for advanced mode in the line
This puts the class on ALL img elements. I have not worked out how to control whether the attribute is there or not - but I hope this helps a little.
Steve
Comment #3
Steve Lockwood commentedYou could also alter the default valid elements directive, see http://wiki.moxiecode.com/index.php/TinyMCE:Configuration
The default is:
The img directive is on the 5th line of this and you would need to add "class" in there.
Here's how the entire init script would then look:
I've tried this and it seems to work - if you manually edit the html to have class="lightbox" the html is preserved. Would be nice if you could specify the class in the tinymce popup window but I can't see how to do that.
Steve
Comment #4
pieter333 commentedThnx for finding out!! I will give it a try as soon as possible
Comment #5
Steve Lockwood commentedComment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.