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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Javascript tyni mce Editor

Go to End

4 Posts   2996 Views


Community Member, 3 Posts

21 August 2010 at 5:47am

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">
<! -
</ Script>

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

and then after the save of the page

<script type="text/javascript"> / / <! [CDATA [
[CDATA [<! [CDATA [/ / <! [CDATA [
/ / ]]]]]]<![ [><![ 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


Community Member, 1 Post

19 November 2010 at 1:51am

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 !?!



Community Member, 12 Posts

20 November 2010 at 8:13am

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

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


Community Member, 126 Posts

5 February 2011 at 2:28am

same problem here, so i raised a ticket for this: