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

changed
Title
SetupHow to setup FCKeditor - Howto
unchanged
Category
Tutorials
unchanged
Tags
unchanged
Content
To start with you need to download the latest stable release of
[FCKeditor](http://www.fckeditor.net/download "Download").
Extract the downloaded file and place the <i>fckeditor/</i> folder
in your applications webroot directory.

Next to do is to download the Yii FCKeditor
[extension](http://www.yiiframework.com/extension/fckeditor-integration/
"Download"), created by Ascomae. 
Extract the downloaded file, and place the <i>fckeditor/</i> widget
folder in your web applications <i>protected/extensions/</i>
directory.

## Configuring the FCKeditorWidget

In the view where you want to use the FCKeditorWidget:

~~~
[php]
<?php
$this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
            'model'     =>  $model,
            'attribute' => 'Text',
            'height'    =>  '400px',
            'width'     =>  '100%',
            'fckeditor' => 
dirname(Yii::app()->basePath).'/fckeditor/fckeditor.php',
            'fckBasePath' =>
Yii::app()->baseUrl.'/fckeditor/')
); ?>
~~~

+ the <b>model</b> property is the instance of the Model to be
associated with.
+ <b>attribute</b> the Model attribute to be associated with.
+ <b>fckeditor</b>, the path to the fckeditor php file.
+ <b>fckBasePath</b>, the url to the editor frontend to be loaded
inside the iframe.

If those instructions have been followed exactly the FCKeditor should work
correctly.
Write new article
  • Written by: krillzip
  • Updated by: Dark-Sun
  • Category: Tutorials
  • Yii Version: 1.1
  • Votes: +3 / -1
  • Viewed: 15,550 times
  • Created on: Feb 8, 2009
  • Last updated: Jul 13, 2012