Has anyone monkeyed with the editor to be able to pass in an alternate path and/or filename to load instead of having the editor load "fckstyles.xml" from within the basePath directory path?
Tue, 09/13/2005 - 09:09
#1
small bumpage
one more bump
RE: Custom path to fckstyles.xml (or alt. nam
FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
Sweikert, it took me about 20 seconds to find this in the config file. That is probably why no one has replied.
I guess I wasn't clear enough.
That said, I've since figured out how to do it -
In the page you're calling the editor from - whichever way you're calling it (based on platform), there are various vars you set - InstanceName, BasePath, Width, Height, etc. Add in a new one, "StylesPath", with the path from the webroot to the XML styles file you want to load. You can have the path hardcoded or make it dynamic to load one of many XML style files.
In the fckeditor.*** file in the main 'fckeditor' dir - *** being cfm, php, asp, etc - near the top, look for where various vars are set - InstanceName, BasePath, Width, Height, etc. Add in "StylesPath" to this list to match. Later in the same file, look for where a var "sURL" or "sLink" is being created and added onto, especially where the "Toolbarset" var is being added. Add some code after that to tack on "&StylesPath=" and your StylesPath var onto the end of sLink/sURL.
In fckconfig.js, also in the main 'fckeditor' dir - around line 96 you'll find the line
FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
comment it out and add in:
FCKConfig.StylesXmlPath = FCKURLParams['StylesPath'];
Working great for me so far, in a CF environment.