Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » How do I use Javascript in HTML source editor

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: 308 Views
  • ShambolicPaul
    Avatar
    Community Member
    1 Post

    How do I use Javascript in HTML source editor Link to this post

    Hello.
    I am a total newbie and I've been trying to build a website for a friend as a favour.
    I'm trying to insert some Javascript into the HTML source editor in the CMS but I click insert and nothing happens and the code seems to be stripped out.

    I understand that tiny MCE might be stripping out the code? Any silverstripe experts out there know how I can just write and edit code like normal into the HTML editor? Some sort of setting I have to change or list of allowed elements to put into the config files or something.

    I'm really at a loss here. Please help me.

  • Nobrainer Web
    Avatar
    Community Member
    134 Posts

    Re: How do I use Javascript in HTML source editor Link to this post

    I think you might be better of just placing the Javascript in the template file, or if you need to be able to add for each page via the CMS, add a normal textfield, instead of the HTMLEditorField.

    See http://doc.silverstripe.org/framework/en/tutorials/2-extending-a-basic-site for info on how to add custom fields to the CMS.

    Hope it helps :o)

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