How to setup FCKeditor

You are viewing revision #2 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version or see the changes made in this revision.

« previous (#1)next (#3) »

To start with you need to download the latest stable release of FCKeditor. Extract the downloaded file and place the fckeditor/ folder in your applications webroot directory.

Next to do is to download the Yii FCKeditor extension, created by Ascomae. Extract the downloaded file, and place the fckeditor/ widget folder in your web applications protected/extensions/ directory.

Configuring the FCKeditorWidget

In the view where you want to use the FCKeditorWidget:

<?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 model property is the instance of the Model to be associated with.
  • attribute the Model attribute to be associated with.
  • fckeditor, the path to the fckeditor php file.
  • fckBasePath, the url to the editor frontend to be loaded inside the iframe.

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

3 1
5 followers
Viewed: 32 162 times
Version: Unknown (update)
Category: Tutorials
Tags:
Written by: krillzip
Last updated by: Dark-Sun
Created on: Feb 8, 2009
Last updated: 12 years ago
Update Article

Revisions

View all history