Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

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

Javascript html-Editor


Reply

4 Posts   1864 Views

Avatar
Bruno

20 August 2010 at 6:16am Community Member, 3 Posts

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

Avatar
WebSpilka

24 September 2010 at 9:19pm (Last edited: 24 September 2010 9:20pm), Community Member, 79 Posts

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[

Avatar
Bruno

24 September 2010 at 10:45pm Community Member, 3 Posts

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

Avatar
schellmax

5 February 2011 at 2:28am Community Member, 126 Posts

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