In a Joomla website, I have enabled the CKEditor as default text editor. I want to define some custom styles, that will be displayed in the Styles menu. I have found documentation of the CKEditor that describes how this should work, but I cannot figure out how to implement this in my Joomla site.
As per the documentation, 开发者_StackOverflowI have tried to edit the 'default' styleset by adding my own definitions, but this has no effect.
I have also tried to create a new styleset and add this to the editor, but this has also no effect. I can find only one or two places where CKEDITOR.addStylesSet
or config.stylesCombo_stylesSet = 'default'
appears in the code, but editing these files has no effect, as if some other code overrules the config in these files.
There is a bug in the joomla component (If working with Joomla 1.6). I've had the same error, debugged it to find out that they use a different folder than stated at the tooltip.
They say: "This file should exist in the plugins/editors/ckeditor/styles folder"
What actually happens is the PHP code checking for file existance at:
plugins/editors/ckeditor/ckeditor/styles
and then uses their stated folder to load the actual file
It appears that this is the code that causes the error:
if (file_exists(dirname(__FILE__).DS.'ckeditor'.DS.'styles'.DS.$style_file))
note the extra 'ckeditor'
Anyway, this folder doesn't exist. You should create it, and put a file in it to bypass the existence check.
Same thing with the "Templates" file...
精彩评论