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, biapar, Willr, Ingo, swaiba, simon_w

Can't edit HTML source


Reply


7 Posts   1771 Views

Avatar
ping

Community Member, 4 Posts

3 November 2009 at 11:35am

Hello,

I would like to add some Javascript code in some of my pages. So I tried to use the "Edit HMTL Source" button, but I can't change the HTML in the newly opened window.
I can neither click into the code nor edit it. When I click "Insert", the following code is written to the editor:

');else if(engine == "opera") document.write('');// else if(engine == "khtml") document.write(' ');

I attached a picture of the HTML editor window; maybe someone could give me a hint?

Many thanks in advance :-)

Greets ping

Attached Files
Avatar
dalesaurus

Community Member, 283 Posts

3 November 2009 at 5:10pm

TinyMCE strips out/defangs javascript by default on save. However in your screenshot it looks like the item is disabled. Have you deleted or otherwise changed this item? Can you retrace how you got to this point?

Avatar
ping

Community Member, 4 Posts

7 November 2009 at 4:25am

I only installed Silverstripe and worked with the default settings. This problem occured since the beginning of the installation :(

Avatar
dalesaurus

Community Member, 283 Posts

7 November 2009 at 6:57am

This is a very weird problem. Advcode (the tinymce plugin that does this) has a disabled textarea that is supposed to be hidden, and you normally work in an enabled one.

If it has been like this from the beginning something is wrong. Are you an Admin when you attempt to do this? Have you set any permissions in Security that might be doing this?

Avatar
ping

Community Member, 4 Posts

7 November 2009 at 12:13pm

Yes, I am Admin when I try to edit HTML pages and I have not been working with security permissions yet so they should be ok... I did not change any file permissions on the server, but maybe my hoster (it is a free one) set the permissions too restrictive? Would that be an idea?

Avatar
dalesaurus

Community Member, 283 Posts

7 November 2009 at 12:25pm

On closer review it looks like all the plugins are not loading for Advcode either in the right order or at all.

Can you watch the loading in the Net tab under Firebug? I can get this to happen when gecko.js (in Firefox) is removed or delayed. This would mean a hosting or file issue from your server to your browser.

Avatar
ping

Community Member, 4 Posts

8 November 2009 at 11:49pm

I watched the loading process in Firebug and gecko.js completes with "200 Ok". I am not an expert in Firebug, but gecko.js seems to load normally in the screenshot, don't it?

Let me know if you need any other screenshots for more information ;)

Attached Files