2012-04-21 7 views
0

エディタで値を入力したいと思います。 通常、内容を表示するには$oFCKeditor->Valueを使用しました。FCKエディタ内の値を入力YII拡張

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',), 

エディタに値を表示するパラメータは何ですか?

答えて

1

FCKeditorヘルプに設定された値がmodelから取得される:

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

これは$model->contentにFCKEditorの値を設定します。

定義済みの値を設定する必要がある場合は、単純にウィジェットを表示する前にこの操作を行うことができます:

$model->content = 'Some text goes here'; 
+0

おかげでその作業罰金を。 – designersvsoft

+0

もう一度手伝ってください。このリンクを参照してくださいhttp://stackoverflow.com/questions/10256729/yii-framework-select-the-values-in-dropdownlistこれについて何か考えてもらえますか? – designersvsoft

関連する問題