How to setup CKeditor

To start with you need to download the latest stable release of CKeditor. Extract the downloaded file and place the ckeditor/ folder in your applications webroot directory. (beside "protected" and "css" and other directories)

WARNING: if you put the ckeditor in 'protected' directory it will NOT work.

Next to do is to download the The CKeditor Integration extension, created by Ali Qanavatian. Extract the downloaded file, and place the ckeditor/ widget folder in your web applications protected/extensions/ directory.

Configuring the CKeditorWidget

In the view where you want to use the CKeditorWidget:

<?php $this->widget('application.extensions.ckeditor.cKEditorWidget',array(
	'model'=>$pages,				# Data-Model (form model)
	'attribute'=>'content',			# Attribute in the Data-Model
	'toolbarSet'=>'Basic', 			# EXISTING(!) Toolbar (see: ckeditor.js)
									# Path to ckeditor.php
									# Relative Path to the Editor (from Web-Root)
	'css' => Yii::app()->baseUrl.'/css/index.css',
									# Additional Parameters
) ); ?>

If those instructions have been followed exactly the CKeditor should work correctly.

NOTE: linux users keep an eye on permissions of files and directories.


the older version compatible with FCKeditor 2.x

Question and bug reports

3 0
Viewed: 31 638 times
Version: 1.1
Category: Tutorials
Written by: Dark-Sun
Last updated by: Dark-Sun
Created on: Jul 13, 2012
Last updated: 9 years ago
Update Article


View all history

Related Articles