With this extension you can use the FCKEditor (www.fckeditor.net) within your Yii-Application.
protected/extensionsSee the following code example:
$this->widget('application.extensions.fckeditor.FCKEditorWidget',array( "model"=>$pages, # Data-Model "attribute"=>'content', # Attribute in the Data-Model "height"=>'400px', "width"=>'100%', "toolbarSet"=>'Basic', # EXISTING(!) Toolbar (see: fckeditor.js) "fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php", # Path to fckeditor.php "fckBasePath"=>Yii::app()->baseUrl."/fckeditor/", # Realtive Path to the Editor (from Web-Root) "config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',), # Additional Parameter (Can't configure a Toolbar dynamicly) ) );
Total 10 comments
http://www.yiiframework.com/extension/the-ckeditor-integration/
tested with CKEditor 3.6
updated by me :)
www.fckeditor.net redirects to ckeditor.com and download file is also ckeditor...
New version has been released incorporating the suggested improvements and minor fixes. Head to http://code.google.com/p/yii-fckeditor-integration/ for download
I use this ext in localhost OK ,But on host when upload image or copy news,it OK But all path of image were change to wrong when save in database . Please help me fix it.
... but this extension is just some kind of "glue-code" between the Yii-Framework and the fck-editor (fckeditor.net).
You need to install and configure the fckeditor (Version 2.X) as well.
And you must be aware of security.
The fckseditor comes with deactivated upload-functionallity.
I made two small changes in the extension to work without a model.
The amendments are on the links below: FCKEditorWidget.php fCKEditorWidget.php
Congratulations on the extension.
-- Translated by Google Translator
In the file "FCKEditorWidget.php"
if(!isset($this->fckeditor)){ throw new CHttpException(500,'"fckBasePath" have to be set!'); }
Shouldn't be? if(!isset($this->fckBasePath)){
You have 2 'ifs' equal.
Anyway, great extension!
First, great Job, nice Extension.
But i have a problem with the customizing of the toolbars. If i choose a different toolbar as Basic and Default i get an Error that the Toolbar doesnt exists. I have configured my toolbar in fckconfig.js. If i change one of the two existing Toolbars, the editor would not change, it remains as the first time.
Seems like there could only be 1 FCKEditor per page. Need to have two ore more, is it possible?
How can the type of the toolbar be changed?
First of all, nice job! I had to make some minor adjustments to make it work. 1 - use <?php instead of <? at the beginning of fCKEditorWidget.php view. 2 - Remove all trailing spaces at the end of that same file and from the widget php file also. 3 - adjust the $oFCKeditor->BasePath variable in the view file to reflect the correct path of my fckeditor. Perhaps a variable for this? or detect from the $fckeditor property?
Leave a comment
Please login to leave your comment.