我想在编辑器中填充值。
通常我们使用$oFCKeditor->Value
来显示内容。
对于Yii fck extention,参数是什么?
$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',),
在编辑器中显示值的参数是什么?
答案 0 :(得分:1)
从model
"model"=>$model, # Data-Model
"attribute"=>'content', # Attribute in the Data-Model
这会将FCKEditor值设置为$model->content
。
如果您需要设置预定义值,您可以在显示小部件之前执行此操作:
$model->content = 'Some text goes here';