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.

General Questions /

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

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

How do I stop the content window from altering code?


Go to End


6 Posts   1217 Views

Avatar
superted81

Community Member, 5 Posts

26 November 2010 at 5:05pm

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 :-)

Avatar
swaiba

Forum Moderator, 1899 Posts

26 November 2010 at 10:10pm

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.

Avatar
superted81

Community Member, 5 Posts

29 November 2010 at 7:56pm

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.

:-)

Avatar
swaiba

Forum Moderator, 1899 Posts

29 November 2010 at 9:52pm

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?

Avatar
superted81

Community Member, 5 Posts

30 November 2010 at 1:31pm

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).

http://www.p51labs.com/lightwindow/

I know there's a couple of modules floating around (http://silverstripe.org/slideshow-pro-module/) 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.

Avatar
swaiba

Forum Moderator, 1899 Posts

30 November 2010 at 9:35pm

I hear the DOM is good for presenting media files, but for a simple gallery I use... http://silverstripe.org/customising-the-cms/show/14727#post294868

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.