Javascript 在 ckeditor 的工具栏上添加多个额外的插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12639195/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
add multiple extra plugins on a toolbar of ckeditor
提问by KomalJariwala
I want to add multiple plugins(which i have created) on a toolbar of ckeditor. I have written below code in config.js
我想在 ckeditor 的工具栏上添加多个插件(我创建的)。我在 config.js 中编写了以下代码
CKEDITOR.editorConfig = function( config ) {
config.toolbar_Full = [
['Styles', 'Bold', 'Italic', 'Underline', 'SpellChecker', 'Scayt', '-', 'NumberedList', 'BulletedList'],
['Link', 'Unlink'], ['Undo', 'Redo', '-', 'SelectAll'], '/', ['timestamp', '-', 'linkbutton']
];
config.extraPlugins = 'linkbutton, timestamp';
};
and i have two different custom plugins. but another plugin is not accepted. How to add another plugin on a one toolbar?
我有两个不同的自定义插件。但不接受另一个插件。如何在一个工具栏上添加另一个插件?
回答by Francis
You are just right except of the space after the comma so your definition regarding http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.extraPluginsshould be:
除了逗号后的空格外,您是正确的,因此您对http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.extraPlugins的定义应该是:
config.extraPlugins = 'linkbutton,timestamp';