2011-11-30 65 views
2

我需要在我的項目中使用ckeditor實例的默認值。 在我控制我加載ckedotir和ckfinder助手這樣:CodeIgniter - CKEditor的默認值

$this->load->library('ckeditor'); 
$this->load->library('ckfinder'); 
$this->ckeditor->basePath = base_url().'asset/ckeditor/'; 
$this->ckeditor->config['toolbar'] = array(
        array('Source', '-', 'Bold', 'Italic', 'Underline', '-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','-','NumberedList','BulletedList') 
       ); 
    $this->ckeditor->config['language'] = 'it'; 
    $this->ckeditor->config['width'] = '730px'; 
    $this->ckeditor->config['height'] = '300px';    
    $this->ckfinder->SetupCKEditor($this->ckeditor,'../../asset/ckfinder/'); 

然後進入我的看法,我使用:

echo $this->ckeditor->editor("area1"); 
echo $this->ckeditor->editor("area2"); 

加載的形式,但我不明白怎麼設置默認價值...你能幫助我嗎?

回答

2

默認值是editor()方法的第二個參數。

echo $this->ckeditor->editor("area1","default value1"); 
echo $this->ckeditor->editor("area2","default value2"); 
+0

謝謝本,它的工作原理! –