0

我在我的项目中使用CKEditor,我有要求在页面上打印ckeditor内容,所以我想限制ckeditor的高度,所以我给高度为220px和使用溢出删除滚动条:隐藏,但是当用户去ckeditor区域结束并按下输入时,内容增加而没有滚动条选项。CKEDITOR自动增加内容高度时使用编辑器底部输入

有什么办法可以限制ckeditor中的内容行数?

下面是我的CKEditor代码:

CKEDITOR.replace('summaryEditor', 
    { 
     toolbar: 
     [    
      { name: 'customToolBar', items: ['Bold', 'Italic', 'Underline', 'JustifyLeft', 'JustifyCenter', 'Font', 'FontSize', 'NumberedList', 'BulletedList', 'Link', 'Image', 'Table', 'Source', 'questions'] } 
     ], 
     height: '220px', 
     resize_enabled: false, 
     contentsCss: 'body {overflow:hidden;}', 
     autoGrow_onStartup: false, 
     extraPlugins: 'questions', 
     removePlugins: 'elementspath' 
    }); 

回答

0

自动增长的插件是不是3个默认的一部分建立CKEditor的,基本的,标准还是满。所以我不确定你是如何安装并启用的,如果你不想要它。

但是,如果您只是将'autogrow'添加到removePlugins列表中,它应该停止。

但是,您的身高设置应该覆盖编辑器的内容高度。我只是将高度设置为100,并且工作正常。

CKEDITOR.replace('editor', { 
    height: 100 
    }); 

这里是演示plnkr: http://plnkr.co/edit/lsFaT1CMMeDePnjVc5RD?p=preview

相关问题