Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Javascript html-Editor

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1849 Views
  • Bruno
    Avatar
    Community Member
    3 Posts

    Javascript html-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
    Bruno

  • fiord
    Avatar
    Community Member
    79 Posts

    Re: Javascript html-Editor Link to this post

    I have the same problem.
    You have decided it?

    public static $db = array(
    ...
       "HtmlVideoContent" => "HTMLText",
    ...


    after insert in this fild
    <div id="cse" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript">
    google.load('search', '1', {language : 'uk'});
    google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('013184735033213536117:3db2xibqbvi');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    options.setAutoComplete(true);
    customSearchControl.draw('cse', options);
    }, true);
    </script>
    And press save
    I have
    <div id="cse" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"/><script type="text/javascript"><![CDATA[<![CDATA[
    google.load('search', '1', {language : 'uk'});
    google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('013184735033213536117:3db2xibqbvi');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    options.setAutoComplete(true);
    customSearchControl.draw('cse', options);
    }, true);
    ]]]]><![CDATA[>]]></script>

    Afrer secon save
    A have
    <div id="cse" style="width: 100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"/><script type="text/javascript"><![CDATA[<![CDATA[<![CDATA[<![CDATA[
    google.load('search', '1', {language : 'uk'});
    google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('013184735033213536117:3db2xibqbvi');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    options.setAutoComplete(true);
    customSearchControl.draw('cse', options);
    }, true);
    ]]]]]]]]><![CDATA[><![CDATA[><![CDATA[>]]]]]]><![CDATA[><![CDATA[>]]]]><![CDATA[>]]></script>

    what is this bug with
    <![CDATA[<![CDATA[

  • Bruno
    Avatar
    Community Member
    3 Posts

    Re: Javascript html-Editor Link to this post

    Hi, Thanks. No, unfortunately I got even no solution and no suggestion here in the forum.
    Greeting
    Bruno

  • schellmax
    Avatar
    Community Member
    126 Posts

    Re: Javascript html-Editor Link to this post

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

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