Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » TinyMCE allow Javascript

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: 2817 Views
  • plajoie
    Avatar
    Community Member
    4 Posts

    TinyMCE allow Javascript Link to this post

    I need to allow javascript on the cms content page but in can't find where tinyMCE extended valid would be on SilverStripe 2.3.0.

    Thanks

  • spirou
    Avatar
    Community Member
    2 Posts

    Re: TinyMCE allow Javascript Link to this post

    Hi,

    ran into similar troubles with SS 2.3.2 RC2.
    Modifications from http://silverstripe.org/general-questions/show/255947 are not useful here.
    valid_elemnts are set to *

    • in jsparty/tiny_mce2/tiny_mce.js
      Advise from some of the wiser ones would help.

      spirou

  • banal
    Avatar
    Community Member
    901 Posts

    Re: TinyMCE allow Javascript Link to this post

    Did you edit the rewrites in tiny_mce_improvements.js ? Because these will strip your JS code...
    How does your entered code look like, what does TinyMCE do with it?

  • spirou
    Avatar
    Community Member
    2 Posts

    Re: TinyMCE allow Javascript Link to this post

    I commented the rewrites from http://silverstripe.org/general-questions/show/255947 out.
    But I still can`t insert <script> areas via the Html-Popup in TinyMCE.
    As a test I inserted an alert statement (the one you gave cob-web), but it is still parsed out.

    BTW: the function sapphiremce_cleanup in tiny_mce_improvements.js is called before the popup opens, after you close it and every time you move to or away from the page.
    [Edit]If I inspect the page content in phpMyAdmin, the <script> tags are already removed. So it must be a TinyMCE .js script.

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