fairy_demon 2011-05-24 11:23:01 3631次浏览 4条回复 0 0 0

注意:本教程使用的FCKeditor版本是:2.6.6,点击下 载地址。

需求:

Yii 1.0 或更新的版本 FCKEditor FCKEditor integration widget:这里使用的版本是 0.0.4,点击下 载。 安装:

解压fckeditor-integration-0.0.4.zip到 protected/extensions。 解压FCKeditor:假设我们的应用的URL是http://localhost/musicdream/,实际目录是C:\wamp \www\musicdream\,将fckeditor解压至C:\wamp\www\musicdream\,这时可以看到一个目录C:\wamp \www\musicdream\fckeditor,里面就是fckeditor所有的文件。 使用: 在一个视图文件(例如C:\wamp\www\musicdream\protected\views\artist_create.php)中:

<?php $this->widget('application.extensions.fckeditor.FCKEditorWidget',array( 'model' => $model, 'attribute' => 'intro',//字段名字 'height' => '500px',//高度 'width' => '100%',//宽度 'fckeditor' => Yii::app()->basePath.'/../fckeditor/fckeditor.php', 'fckBasePath' => Yii::app()->baseUrl.'/fckeditor/', 'config' => array('ToolbarStartExpanded'=>false)//配置,这里设置的是默认不展开工具条 ) ); ?>

您需要登录后才可以回复。登录 | 立即注册