Log in or register to post comments
Last post
gglwebmaster's picture
Joined: 21/06/2006
Posts: 3
Multiple Editor Area CSS files with Asp.net
Hi I'm trying to add two CSS file links to the Editor Area and so far no luck in getting them to work

in "/_source/internals/fckconfig.js" it says...

// EditorAreaCSS accepts an array of paths or a single path (as string).
// In the last case, transform it in an array.
if ( typeof( oConfig.EditorAreaCSS ) == 'string' )
oConfig.EditorAreaCSS = [ oConfig.EditorAreaCSS ] ;
}

I have tried
myEditor.EditorAreaCSS = "http://www.mydomain.com/style.css,http: ... orarea.css"

and other options has anyone got this working?

Only reason I am trying to use two is that the site I'm editing has a background image and I want to override it so that it is has plain white background in the editor
stephantual_'s picture
Joined: 25/06/2006
Posts: 63
RE: Multiple Editor Area CSS files with Asp.n
It wants an array, not a string. You are passing a string. You need to pass an array instead:

http://www.w3schools.com/js/js_obj_array.asp
gglwebmaster's picture
Joined: 21/06/2006
Posts: 3
RE: Multiple Editor Area CSS files with Asp.net
I realise I need to pass an array, but haven't been able to find a way to pass an array from asp.net to the Editor Config settings..


I have tried

EditorAreaCSS= "new Array('http://www.mydomain.com/style.css,http://www.mydomain.com/fckeditor/custom_editorarea.css')"

EditorAreaCSS=('http://www.mydomain.com/style.css,http://www.mydomain.com/fckeditor/custom_editorarea.css')

any got this working in asp.net ?
gglwebmaster's picture
Joined: 21/06/2006
Posts: 3
RE: Multiple Editor Area CSS files with Asp.net
Have done this using a custom config.js file


Instance.CustomConfigurationsPath = "/fckCustom/custom_config.js

FCKConfig.EditorAreaCSS = new Array ('http://www.domain.com/style.css','http://www.domain.com/fckCustom/custom_editorarea.css') ;
dcyphr's picture
Joined: 05/01/2008
Posts: 20
Re: Multiple Editor Area CSS files with Asp.net
Got it!

string cssList =
"http://mydomain.com/style1.css," +
"http://mydomain.com/style2.css," +
"http://mydomain.com/style3.css";
fckeditorInstance.EditorAreaCSS = cssList;