Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How do I stop the content window from altering code?

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

Page: 1
Go to End
Author Topic: 699 Views
  • superted81
    Avatar
    Community Member
    5 Posts

    How do I stop the content window from altering code? Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: How do I stop the content window from altering code? Link to this post

    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.

  • superted81
    Avatar
    Community Member
    5 Posts

    Re: How do I stop the content window from altering code? Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: How do I stop the content window from altering code? Link to this post

    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?

  • superted81
    Avatar
    Community Member
    5 Posts

    Re: How do I stop the content window from altering code? Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: How do I stop the content window from altering code? Link to this post

    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.

    699 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.