0

I have set up the size of my CKEditor window as follows:

CKEDITOR.editorConfig = function( config ) {

   config.height = 350;
   config.width = '100%';
};

But I would like to have more than one size. A large and a small size.

Can anyone tell me how I can change the size so one instance is different from another.

4

1 回答 1

1

您可以在初始化 CKEditors 时定义设置,而不是仅依赖配置文件。

标记

<textarea id="test1"></textarea>
<textarea id="test2"></textarea>

脚本

<script>
CKEDITOR.replace('test1', { width:"800px", height:"200px" }); 
CKEDITOR.replace('test2', { width:"400px", height:"100px" }); 
</script>

在此处输入图像描述

您还可以定义不同的工具栏:

CKEDITOR.replace('test1', { width:"600px", height:"300px", toolbar:'myToolBar' }); 
于 2013-09-09T05:01:03.960 回答