TinyMCE stripping out my javascript
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 21, 2010 (RSS)
By benedict - May 20, 2010
Hi guys,
When I try to paste in:
When I close the HTML window, and then reopen it, it comes out like this:
Needless to say, it has lost all its functionality. Any ideas what to do here?
When I try to paste in:
<script src="//x.onehub.com/dropboxes/xy28bs8v/drops/new.js" type="text/javascript"></script><span class="powered_by_onehub">Powered by <a href="http://onehub.com/">Onehub</a></span>
When I close the HTML window, and then reopen it, it comes out like this:
<script type="text/javascript"></script>
<p><span class="powered_by_onehub">Powered by <a href="http://onehub.com/">Onehub</a></span></p>
Needless to say, it has lost all its functionality. Any ideas what to do here?
Re: [benedict] TinyMCE stripping out my javascript
By jarvis - May 21, 2010
Not tried it but you could edit this file:
Add this line:
Into the block that looks like:
Around line 50 and add it in so it then looks like
That may help.
Cheers
cmsAdmin/lib/wysiwyg.php
Add this line:
extended_valid_elements :"script[language|type]",
Into the block that looks like:
tinyMCE.init({
mode : "exact",
theme : "advanced",
language: "{$SETTINGS['wysiwyg']['wysiwygLang']}",
spellchecker_languages:
Around line 50 and add it in so it then looks like
tinyMCE.init({
mode : "exact",
theme : "advanced",
language: "{$SETTINGS['wysiwyg']['wysiwygLang']}",
extended_valid_elements :"script[language|type]",
spellchecker_languages:
That may help.
Cheers