Got it. Through trial & error I found some syntax that works.
There may be other ways to do this, but this is what worked for me:
config-text.js
CKEDITOR.editorConfig = function (config) {
config.toolbar = [
{ name: 'custom', items: ['HelloWorld'] },
{ name: 'about', items: ['About'] }
];
config.toolbarGroups = [
{ name: 'custom' },
{ name: 'about' }
];
};
plugin.js
CKEDITOR.plugins.add("helloworld", {
init: function (editor) {
editor.addCommand("helloWorld",
{
// Enable the button for both 'wysiwyg' and 'source' modes
modes: { wysiwyg: 1, source: 1 },
exec: function (editor) {
alert("Hello, world!");
}
});
editor.ui.addButton("HelloWorld", {
label: "Hello World",
command: "helloWorld",
icon: this.path + "images/helloworld.png"
});
}
});