Hi,
I downloaded the extension for using CKEditor - but I can't seem to get it to use the custom.js file, or to be able to set custom properties through Yii.
For instance, if I uncomment the two default configuration lines in ckeditor/assets/config.js...
CKEDITOR.editorConfig = function( config )
{
config.language = 'fr';
config.uiColor = '#AADC6E';
};
I ought to see a different background color, and my default language should be french - but no such luck.
I tried setting up a custom configuration file through the Yii widget interface, but it says it's not a property of the widget:
for instance, using this...
<?php $this->widget('application.extensions.ckeditor.CKEditor', array(
'model'=>$model,
'attribute'=>'OneLineStory',
'editorTemplate'=>'basic',
'customConfig'=>'/custom/ckeditor_config.js'
)); ?>
gives me the following CException:
Property "CKEditor.customConfig" is not defined.
Is there a way to set up a config.js file somewhere (a custom one would be ideal) so I can have the full range of CKeditor customizations?
-Charlie
Page 1 of 1
CKEditor customization How to customize the installation of CKEditor?
#2
Posted 08 November 2009 - 02:49 PM
I have this problem too and i find one way.
1. open file "protected/extensions/ckeditor/CKEditor.php"
2. find code:
3. append your changes. For example:
1. open file "protected/extensions/ckeditor/CKEditor.php"
2. find code:
$js =<<<EOP
CKEDITOR.replace('{$name}',{$options});
EOP;
3. append your changes. For example:
$js =<<<EOP
CKEDITOR.replace('{$name}',{$options});
CKEDITOR.config.toolbar_Full = [
['Source'],
['Format','Font','FontSize'],
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
];
EOP;
#3
Posted 10 November 2009 - 11:27 AM
thanks - you can also use the newly uploaded extension: NHCKEditor
Share this topic:
Page 1 of 1

Help












