from http://docs.fckeditor.net/FCKeditor_2.x ... ion/Styles I took the line
FCKConfig.EditorAreaCSS = '/myownstyles.css' ;
and transfered it into JS:
ed.Config["EditorAreaCSS"] = '/cms/css.php?site='+siteid;
... That works perfectly. But when I come to the XML.... taking the line:
FCKConfig.StylesXmlPath = '../fckstyles.xml' ;
and transfering it into:
ed.Config["StylesXmlPath"] = '/cms/cssxml.php?site='+siteid;
... that doesnt work and it continues to run off /cms/fckeditor/fckstyles.xml
Any ideas why one works and the other doesnt?? or more helpfully how to set the Styles XML file through JS?
I would like to point out that using;
$oFCKeditor->Config['StylesXmlPath'] = '/cms/cssxml.php?site=1';
in the php file that 'creates' the editor, does work.
Thanks
Re: Set StylesXmlPath with JavaScript
Re: Set StylesXmlPath with JavaScript
For debuging i just have a plain xml file.. rather than the dynamicaly generated xml from the php file.
This is the code:
Do you have any ideas where the mistake might be??
I promise the syntax of the XML is correct.
Thanks
Re: Set StylesXmlPath with JavaScript
It would be really useful if someone had a working example.
At the moment the Styles drop-down just contains the default Styles.. Marker: Yellow, Marker: Green, etc
Thanks
EDIT: Sorry I did not make it clear that I am wanting to change the XML file dynamicaly, not just once before initiating the editor.
I thought I might need to re-initialise the editor but could not find a way to do this so abandoned that line of thought.
I submit that the documentation of FCKeditor is rather significantly lacking in areas.