我是 Yii 框架的新手,我的 CMS 管理页面需要一个 FCK 编辑器。我将 FCKeditor 下载并解压到根文件夹,并将其扩展名放在 yii 扩展文件夹中。我在我的视图中添加了以下代码
<?php $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
"model"=>$model, # Data-Model
"attribute"=>'content', # Attribute in the Data-Model
"height"=>'400px',
"width"=>'100%',
"toolbarSet"=>'Basic', # EXISTING(!) Toolbar (see: fckeditor.js)
"fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
# Path to fckeditor.php
"fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
# Realtive Path to the Editor (from Web-Root)
"config" => array(
"EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
# http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
# Additional Parameter (Can't configure a Toolbar dynamicly)
) ); ?>
这些都工作正常。但编辑器单独显示。我需要编辑器代替内容文本区域。