CodeIgniter - CKEditor 的默认值

发布于 2024-12-18 12:32:22 字数 932 浏览 1 评论 0原文

我需要在我的项目中使用 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");

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒中人 2024-12-25 12:32:22

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

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

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");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文