0

我想在编辑器中填充值。通常我们用来$oFCKeditor->Value显示内容。

Yii fck 扩展的参数是什么?

 $this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
"model"=>$model,                # Data-Model
"attribute"=>'content',         # Attribute in the Data-Model
"height"=>'400px',
"width"=>'100%',

"fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
                                # Path to fckeditor.php
"fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
                                # Relative Path to the Editor (from Web-Root)
"config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),

在编辑器中显示值的参数是什么?

4

1 回答 1

1

FCKeditor 中设置的值从以下位置检索model

"model"=>$model,                # Data-Model
"attribute"=>'content',         # Attribute in the Data-Model

这会将 FCKEditor 值设置为$model->content

如果您需要设置预定义的值,您可以在显示小部件之前简单地执行此操作:

$model->content = 'Some text goes here';
于 2012-04-21T08:02:04.013 回答