ckeditor打算隐藏工具栏和底部的提示框怎么实现。
如果这时候使用配置toolbar方式,将toolbar配置为空数组,这时候顶部还是会显示一个框。
CKEDITOR.replace('oaNoticeTextarea',{height:380, toolbar: []});
方法一:
CKEDITOR.replace('oaNoticeTextarea', { toolbarCanCollapse: true, toolbarStartupExpanded: false, height: '380px'});
使用该方法初始化富文本框,工具栏这个时候是折叠起来,在右侧有一个展开关闭按钮。
方法二:
CKEDITOR.on('instanceReady', function (ev) {
document.getElementById(ev.editor.id + '_top').style.display = 'none';
document.getElementById(ev.editor.id + '_bottom').style.display = 'none';
});
});
使用该方法可以直接将富文本框的工具栏和底部框隐藏。只展示中间内容部分。此时这里就类似于一个普通的文本域的展示效果。