I'd like to be able to programmatically override the stylesheet settings in fck_config.js so that different users would have different groups of styles available to them. Is there a way to do this with PHP? Thanks.
I would like to override: config.EditorAreaCSS, config.StyleNames, and config.StyleValues.
In my application, each user has a unique stylesheet. After they've logged in, I want to set up fckeditor so their unique stylesheet is set to config.EditorAreaCSS. Then, I want to load their individual styles/values into config.StyleNames and config.StyleValues.
It would be pretty easy to do if I could do it in PHP and override these config settings (similar to how ToolbarSet can be specified). I don't really know Javascript, though.
hi jeff! here's how i did it: load the stylesheet(s) you want into the page calling the editor, and in fck_editor.js, line 43, underneath objContent.DOM.createStyleSheet(config.EditorAreaCSS) ; i added:
var i; for (i = 0; i < parent.document.styleSheets.length;++i) { objContent.DOM.createStyleSheet(parent.document.styleSheets(i).href); } hope this helps ... alex
RE: Dynamic CSS Stylesheets in PHP version
This might help.
https://sourceforge.net/forum/forum.php ... _id=257180
Could you be more specific about which settings?
-Jim
RE: Dynamic CSS Stylesheets in PHP version
In my application, each user has a unique stylesheet. After they've logged in, I want to set up fckeditor so their unique stylesheet is set to config.EditorAreaCSS. Then, I want to load their individual styles/values into config.StyleNames and config.StyleValues.
It would be pretty easy to do if I could do it in PHP and override these config settings (similar to how ToolbarSet can be specified). I don't really know Javascript, though.
--ja
RE: Dynamic CSS Stylesheets in PHP version
here's how i did it: load the stylesheet(s) you want into the page calling the editor, and in
fck_editor.js, line 43, underneath
objContent.DOM.createStyleSheet(config.EditorAreaCSS) ;
i added:
var i;
for (i = 0; i < parent.document.styleSheets.length;++i) {
objContent.DOM.createStyleSheet(parent.document.styleSheets(i).href);
}
hope this helps ...
alex