Reputation: 7618
i need to use a default value for an instance of ckeditor into my project. In my controller i load the helper for ckedotir and ckfinder in this way:
$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/');
then into my view i use:
echo $this->ckeditor->editor("area1");
echo $this->ckeditor->editor("area2");
to load the form but i can't understand how set default value...can you help me?
Upvotes: 2
Views: 1721
Reputation: 26467
The default value is the second parameter of the editor()
method.
echo $this->ckeditor->editor("area1","default value1");
echo $this->ckeditor->editor("area2","default value2");
Upvotes: 2