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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

How do I stop the content window from altering code?


6 Posts   707 Views


26 November 2010 at 5:05pm Community Member, 5 Posts

Hello people,

I was wondering if anyone could tell me...

When I click the 'HTML' icon in the 'Content' part of the CMS. I add code and when I click 'Insert' it changes my code.

How do I stop it from doing this?

Thank you for reading :-)


26 November 2010 at 10:10pm Forum Moderator, 1796 Posts

I am not sure you can - it is designed to enforce standards and remove things like JavaScript I think. If you want to absolutely control the HTML that arrives on the page you'll need to place in within the related template.


29 November 2010 at 7:56pm Community Member, 5 Posts

Thanks for the reply... I finally figured it out.

I just ripped out the 'tinymce' folders from "saphire -> thirdparty"

Then whacked it back after I did what I wanted.



29 November 2010 at 9:52pm Forum Moderator, 1796 Posts

I'm glad you got it sorted this time, but surely when someone comes along and does a save and publish - it will break again?


30 November 2010 at 1:31pm Community Member, 5 Posts

Hehe, this is true.

There's no denying that my method is crude and isn't much of a fix for the long run.

But this hack will have to do until I can figure out a more permanent solution.

I've been trying to get lightwindow 2.0 to work. Which it now does (thanks to the hack).

I know there's a couple of modules floating around ( but I can't seem to get it working with SS ver. 2.4.3

When I add it to the root directory and run http://localhost/dev/build?flush=1 it spews out this:

Notice: DataObjectDecorator::extraDBFields() is deprecated. Please use extraStatics() instead. in C:\... ...\htdocs\sapphire\core\model\DataObjectDecorator.php on line 60

I have no idea what it's talking about. But since it hasn't been officially released I guess it's to be expected.

It's just a bit dissapointing to have such a good CMS and not be able to find a proper module for good presentation of media files.


30 November 2010 at 9:35pm Forum Moderator, 1796 Posts

I hear the DOM is good for presenting media files, but for a simple gallery I use...

But that again moves the "code" to the template file. For anything complicated that needs to appear on the page usually templates are required. You can do some nifty stuff with the the tinymce and editing the HTML but it is, in the long run, unstable if that content is going to be edited by a client in my opinion.