Re: [garyhoffmann] Wysiwyg / TinyMCE stripping Javascript code
Hi Gary,
It looks like the wysiwyg editor (tinyMCE) strips out <SCRIPT SRC> attributes by default. If you're comfortable editing the PHP you can turn that feature off. Here's how:
- Open cmsAdmin/lib/wysiwyg.php
- Make a backup copy of that file
- Search for 'entity_encoding'
- After that line, add this line (in red):
entity_encoding : "raw", // ...
extended_valid_elements : "script[src|type|language]",
Then save that file and reload your editor and you should be able to enter your script tags in the HTML.
Regarding the <![CDATA[...]]> wrapper, does that prevent your JavaScript code from running? I think that's simply done to make your code XHTML-compliant.
Hope that helps, let me know if you have any further problems with that or need more assistance.
All the best,
Chris