I have a CMS which has a number of templates. I would like to use the appropriate template style sheet as FCKConfig.EditorAreaCSS with a line like
I can point to the various stylesheets in the fckconfig.js but don't know how to use a PHP variable ($skin) to tell FCKeditor that the user has adopted a different template (skin) so as to replace the value of "beachy" with the current specific value of $skin
I am sure it's simple, but don't know enough about js to be able to pick up the PHP variable for this purpose.
FCKConfig.EditorAreaCSS = '../../templates/[b]beachy[/b]/central.css' ;
I can point to the various stylesheets in the fckconfig.js but don't know how to use a PHP variable ($skin) to tell FCKeditor that the user has adopted a different template (skin) so as to replace the value of "beachy" with the current specific value of $skin
I am sure it's simple, but don't know enough about js to be able to pick up the PHP variable for this purpose.

Re: Choosing FCKConfig.EditorAreaCSS by a variable
(Sorry, it's ASP, but the principle is the same....)
DIM objRS, objConn response.ContentType = "text/css" SET objConn = CreateSQLConn( Session( "ConnectionString" ) ) SET objRS = ExecuteSQL( objConn, "EXEC spGetStyleSheet " & Session("Account_ID") ) WHILE NOT objRS.EOF Response.Write( objRS( "Style" ) & vbCRLF & "{" & vbCRLF & objRS( "Style_Code" ) &_ vbCRLF & "}" & vbCRLF ) objRS.Movenext WEND objRS.Close objConn.CloseThen in the fckconfig.js put
You could try this, or alternatively trying to call a PHP page which creates and returns the string containing the URL to the style sheet?
James.