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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Javascript html-Editor


Go to End


4 Posts   2893 Views

Avatar
Bruno

Community Member, 3 Posts

20 August 2010 at 6:16am

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

Community Member, 89 Posts

24 September 2010 at 9:19pm

Edited: 24/09/2010 9:20pm

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

Community Member, 3 Posts

24 September 2010 at 10:45pm

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

Avatar
schellmax

Community Member, 126 Posts

5 February 2011 at 2:28am

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