Difference between #1 and #2 of How to setup CKeditor

unchanged
Title
How to setup CKeditor
unchanged
Category
Tutorials
unchanged
Tags
CKeditor, editor widget, editor
changed
Content
To start with you need to download the latest stable release of
[CKeditor](http://ckeditor.com/download "Download").
Extract the downloaded file and place the <i>ckeditor/</i> 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](http://www.yiiframework.com/extension/the-ckeditor-integration/
"Download"), created by Ali Qanavatian. 
Extract the downloaded file, and place the <i>ckeditor/</i> widget
folder in your web applications <i>protected/extensions/</i>
directory.

## Configuring the CKeditorWidget

In the view where you want to use the CKeditorWidget:

~~~
[php]
<?php
$this->widget('application.extensions.ckeditor.cKEditorWidget',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
) ); ?>
~~~

+ the <b>model</b> property is the instance of the Model to be
associated with. like a CFormModel instance or something which you use as your
form model.
+ <b>attribute</b> the Model attribute to be associated with.
+ <b>ckeditor</b>, the path to the ckeditor php file.
+ <b>ckBasePath</b>, the url to the editor frontend to be loaded
inside the iframe.
+ <b>config</b> Most parameter in the CKEditor.Config object can be
changed within this config.
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations
and also see here
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html


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

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

### Links

[the older version compatible with FCKeditor
2.x](http://www.yiiframework.com/wiki/4/ "the older version compatible with
FCKeditor 2.x")

[Question and bug
reports](http://www.yiiframework.com/forum/index.php/topic/33940-the-ckeditor-integration/
"Question and Bug reports here")