With this extension you can use the FCKEditor (www.fckeditor.net) within your Yii-Application.
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
- FCKEditor
- The FCKEditor have to be configured. The Javascript of the Editor must be included to the head-section of the Application.
Installation ¶
- Extract the release file under
protected/extensions
- Extract the fckeditor to a webRoot-Subfolder
Usage ¶
See the following code example:
<?php $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)
) ); ?>
Change Log ¶
September 15, 2010 ¶
- Use without a model
May 18, 2009 ¶
- ToolbarSet can be configured
January 3, 2009 ¶
- Code cleaned
- New Configuration-Parameter "BasePath"
January 2, 2009 ¶
- Initial release.
- Starting a googlecode-Project
New version out
New version has been released incorporating the suggested improvements and minor fixes.
Head to http://code.google.com/p/yii-fckeditor-integration/ for download
this is bugs? about image
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.
Ys it can ...
... 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.
Work without model
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
Bug found
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!
Can't change the Toolbars
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.
Great, but 2 questions
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?
Some adjustments need to make it work
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?
is it outdated?
www.fckeditor.net redirects to ckeditor.com and download file is also ckeditor...
an updated version of this extension which works with CKeditor 3
http://www.yiiframework.com/extension/the-ckeditor-integration/
tested with CKEditor 3.6
updated by me :)
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.