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 に答える