Jump to:

23491 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Javascript tyni mce 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: 2228 Views
  • Bruno
    Avatar
    Community Member
    3 Posts

    Javascript tyni mce Editor Link to this post

    Hi, I work for some time with Silver Stripe. Thanks for the very good program.
    After updating to 2.4.1 I have problems with Javascript in HTML-Tiny-editor. This was
    in the version 2.3 not the case.
    I enter into the HTML editor:
    <script type="text/javascript">
    <! -
    xxxxx;
    //-->
    </ Script>

    and get after Insert
    <script type="text/javascript"> / / <! [CDATA [
    xxxxxxxx;
    / / ]]></ Script>

    and then after the save of the page

    <p>
    <script type="text/javascript"> / / <! [CDATA [
    [CDATA [<! [CDATA [/ / <! [CDATA [
    xxxxxxxx;
    / / ]]]]]]<![ [><![ CDATA CDATA CDATA [><![ [>]]]]<![ CDATA CDATA [><![ [>]]]][ CDATA [>
    / / </ Mce: script> </ p >]]></ script>
    </ P>

    The script is obviously not valid. What must I do to how to achieve at version 2.3, a valid Javascript in the HTML editor. Thanks for the reply.
    With regards from Germany

  • zazoo
    Avatar
    Community Member
    1 Post

    Re: Javascript tyni mce Editor Link to this post

    I got exactly the same problem!

    It's in an own greated textarea and also in the (standard) own-meta-tag field (even textarea).

    I changed my own textarea to a normal input-field and the "CDATA"-phenomenon disappeared!

    I also searched the whole tiny_mce.js and tiny_mce_src.js and changed every "CDATA"-replacement (and there are lots of them) to
    "BLABLADATA", but after reloading, flushing new login the f***ing CDATA was still there !!!!

    So which part of silverstripe do we have to blame for this - I think (maybe) tinymce does NOT cause the problem, but who else !?!

    Frank

  • AlphaCactus
    Avatar
    Community Member
    11 Posts

    Re: Javascript tyni mce Editor Link to this post

    I also encountered this issue. This is occuring in the built in Content field on SiteTree. However, I noticed that I get this behavior even if I edit the database manually. So this code is being added when the page is requested either by the CMS for editing or for viewing on the front end.

    This is what it should look like:

    <script type="text/javascript">
    my javascript code here
    </script>

    -----
    This is what it actually looks like:
    <script type="text/javascript">
    [CDATA[<![CDATA[<![CDATA[<![CDATA[// <![CDATA[
    my javascript code here
    // ]]]]]]]]<![CDATA[><![CDATA[><![CDATA[><![CDATA[>]]]]]]<![CDATA[><![CDATA[><![CDATA[>]]]]<![CDATA[><![CDATA[>]]]][CDATA[>
    // </mce:script></div>]]></script>

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: Javascript tyni mce Editor Link to this post

    same problem here, so i raised a ticket for this: http://open.silverstripe.org/ticket/6425

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