With this extension you can use the CKEditor (http://ckeditor.com/) within your Yii-Application.
Requirements ¶
- Yii 1.0 or above
- CKEditor
- the CKEditor must be beside (protected, css,...) (DON'T put the CKEditor in /protected it won't work!)
Installation ¶
- extract the released file under protected/extensions
- Download and extract the CKEditor in a directory under web-root. (beside 'css' or 'protected')
Usage ¶
see this code:
<?php $this->widget('application.extensions.TheCKEditor.theCKEditorWidget',array(
'model'=>$pages, # Data-Model (form model)
'attribute'=>'content', # Attribute in the Data-Model
'height'=>'400px',
'width'=>'100%',
'toolbarSet'=>'Basic', # EXISTING(!) Toolbar (see: ckeditor.js)
'ckeditor'=>Yii::app()->basePath.'/../ckeditor/ckeditor.php',
# Path to ckeditor.php
'ckBasePath'=>Yii::app()->baseUrl.'/ckeditor/',
# Relative Path to the Editor (from Web-Root)
'css' => Yii::app()->baseUrl.'/css/index.css',
# Additional Parameters
) ); ?>
more optional parameters:
'config' => array('toolbar'=>array(
array( 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike' ),
array( 'Image', 'Link', 'Unlink', 'Anchor' ),
),);
Resources ¶
this extension is built upon "FCKeditor-integration" extension which is outdated now
wiki page
http://www.yiiframework.com/wiki/352/how-to-setup-ckeditor/
Great
Great, Thanks Ali ;-)
where is release?
Where is downloadeble extension? :)
?
The download link is with Waldo?
EDIT: Sorry for being an a-hole man. Thanks for uploading.
download link provided
sorry I forget to put the download link here, since the project is on github it's best to get the latest version there.
by the way the download file is most updated one so far. (i try to keep it update)
A little fix
Thanks,
But if you want it to work on Linux,
you should replace:
application.extensions.TheCKEditor.theCKEditorWidget
with
application.extensions.TheCKEditor.TheCKEditorWidget
How to hide toolbar
How to hide toolbar in ckeditor
Download Link
Where is the downloadable link of the extension..?
Where can I get ckeditor.php file.
Hi,
I saw the configuration and the usage, as you have mentioned above. The place where I have been stuck is, I want to know what should I put in the ckfinder.php file. I think it is for initialization, but what should I put in there..?
Missing ckeditor.php
For all you guy's having the same problem, there's no ckeditor.php file in the zip file for the latest version (4.4.0).
Simply download the oldest from the website (3.6.6.1), and extract ckeditor.php and ckeditor_php4.php and ckeditor_php5.php, add them to ckeditor folder and that's it, all is working.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.