Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Silverstripe 3.0- script tags getting stripped from editor content after save and publish

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

Page: 1
Go to End
Author Topic: 542 Views
  • Neelam
    Avatar
    Community Member
    15 Posts

    Silverstripe 3.0- script tags getting stripped from editor content after save and publish Link to this post

    I need to extend the allowed tags in SilverStripe 3.0 editor (Tinymce) and also allow javascript in it

    I added the below code in mysite/_config.php:

    HtmlEditorConfig::get('cms')->setOptions(array('valid_elements' => "*

    • "));

      above code works and tags like form and input are accepted....

      But its not accepting javascript..(i have tried alert('hello');) It remains after clicking update on the editor, but gets stripped after clicking 'save and publish'

      same code in version 2.4.7 accepted script but it was commented out and CDATA was added..

      please tell me how i can allow javascript in the editor.....

  • Neelam
    Avatar
    Community Member
    15 Posts

    Re: Silverstripe 3.0- script tags getting stripped from editor content after save and publish Link to this post

    Does 3.0 have some clean up mechanism to strip javascript after you click on 'save and publish'?

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