2012-04-21 51 views
0

我想在編輯器中填充值。 通常我們使用$oFCKeditor->Value來顯示內容。填充FCK編輯器內部的值YII擴展名

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

什麼是在編輯器中顯示值的參數?

回答

1

在FCKeditor的設定值是根據model檢索到:

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

這設置FCKEditor的值$model->content

如果您需要設置一個預定義的值,你可以簡單地顯示微件之前:

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

由於其工作的罰款。 – designersvsoft 2012-04-21 09:07:31

+0

還有一個幫助。請看這個鏈接http://stackoverflow.com/questions/10256729/yii-framework-select-the-values-in-dropdownlist你對此有什麼想法嗎? – designersvsoft 2012-04-21 09:07:58