如何在具有不同工具栏的组件中显示多个 ckeditor-textarea? [英] How to display multiple ckeditor-textarea in a component with different toolbar?
问题描述
我在一个组件中有多个 ckeditor,出于某种原因,我希望 textarea-ckeditor 在启用某些工具栏的情况下是只读的;
I have multiple ckeditor in a component and for some reason i want a textarea-ckeditor to be readonly with some toolbar enabled;
即:打印"、预览"、查找"和最大化".
ie: 'print','preview','find', and 'maximize'.
我怎样才能做到这一点?我已经尝试删除插件,但只有在我更改 config.js 时才会成功,这将标准化"我所有的 ckeditor.
How can i achieve this? i've tried removing the plugins but only success if i alter the config.js which will 'standardize' all my ckeditor.
我能想到的是我需要从这段代码中改变一些东西.
What i can think is that i need to alter something from this code.
CKEDITOR.replace('header',{
width: '100%',
height: 570});
感谢您的建议..
推荐答案
我找到了解决方案,但我没有删除工具栏按钮,而是列出了所有需要的按钮,如下所示;
I found the solution but instead of removing the toolbar buttons, i list all the desired buttons as following;
toolbar: [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: ['-','Preview', 'Print', '-' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find','-','-' ] },
{ name: 'tools', items: [ 'Maximize'] }
]
这篇关于如何在具有不同工具栏的组件中显示多个 ckeditor-textarea?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!