CodeIgniter - CKEditor的默认值

时间:2011-11-30 09:50:35

标签: codeigniter ckeditor

我需要在项目中使用ckeditor实例的默认值。 在我的控制器中,我以这种方式加载ckedotir和ckfinder的帮助器:

$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");

加载表单,但我无法理解如何设置默认值...你能帮帮我吗?

1 个答案:

答案 0 :(得分:2)

默认值是editor()方法的第二个参数。

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