Page 1 of 1

TinyMCE WYSIWYG strips code

Posted: Wed May 19, 2010 9:25 pm
by Alpdog14
I have been using CMSMS for a while now and have a question, how do you change the TinyMCE so it does not strip certain code. I am using a javascript for image swap here is the code:

Code: Select all

<p><a href="currentshows.html" id="animate"><img src="images/YESIAM_SITEBUILD_CURRENTSHOWS_LINK.png" oversrc="images/YESIAM_SITEBUILD_CURRENTSHOWS_LINK2.png"></a></p>

<p><a href="contactus.html"><img src="images/YESIAM_SITEBUILD_HECKLEUS_LINK.png" oversrc="images/YESIAM_SITEBUILD_HECKLEUS_LINK2.png"></a></p>
In the editor is strips the "oversrc" element when I try to save it but if I untick the "Turn on/off WYSIWYG" it does not strip the code but then when I go back into that webpage it strips the code again cause I have the "Turn on/off WYSIWYG" set to always be on. I know a few ways around this, like setting that to be off but basically I am just wondering is there a way to have the TinyMCE not strip that kind of code? Any help is most appreciated.

Re: TinyMCE WYSIWYG strips code

Posted: Wed May 19, 2010 9:27 pm
by Alpdog14
I guess one solution is also just to use the image swap feature in the editor

Re: TinyMCE WYSIWYG strips code

Posted: Wed May 19, 2010 10:14 pm
by calguy1000
Best solution:

Remember that Editors are for content.. Don't mix design and content.  Thereby not allowing content editors to screw up your design.

This type of solution would be best solved with either a smarty tag, or by using jquery to add the (non standard) oversize attribute after the page is loaded.  thereby keeping your content separate from your design.