Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Content Editor Discussions /

Forum for content editors and CMS users.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

TinyMCE editor striping code in SS 2.3.7


Go to End


2 Posts   1924 Views

Avatar
Chip Designs

Community Member, 15 Posts

16 April 2010 at 7:57pm

Edited: 16/04/2010 7:58pm

I have currently upgraded my SS from 2.3.3 to 2.3.7. My TinyMCE editor is striping code from the html - it did however use to work by modifying the cms/code/LeftAndMain.php in SS 2.3.3 as i have done so below.

Example code:
<script type="text/javascript" src="http://www.weatherzone.com.au/woys/graphic_current.jsp?postcode=POSTCODE"></script>
<br /><a href="http://www.weatherzone.com.au/radar.jsp">weather radar</a>

I have changed the cms/_config.php file by changing:

'valid_elements' => "+a[id|...etc
to
'valid_elements' => "*",

Now when i add the code, the editor is leaving the <script> tags behind but is striping the 'type' and 'src' from the <script> tag rendering it useless. I think I am on the right track and have read many, many threads on this matter, but there are not many for versions of SS 2.3+. I have looked at the cms/javascript/LeftAndMain.js file but can't see anything that should be causing issues.

Any ideas?

Cheers,
Rob

Avatar
Chip Designs

Community Member, 15 Posts

16 April 2010 at 10:31pm