Skip to content

Instantly share code, notes, and snippets.

@alexfinnarn
Created August 9, 2018 17:03
Show Gist options
  • Save alexfinnarn/900e151d0ab1e43cd208a2d8ed33fb59 to your computer and use it in GitHub Desktop.
Save alexfinnarn/900e151d0ab1e43cd208a2d8ed33fb59 to your computer and use it in GitHub Desktop.
final plugin code
(function ($, Backdrop, CKEDITOR) {
"use strict";
CKEDITOR.plugins.add('csh', {
init: function (editor) {
editor.addCommand('csh_command', new CKEDITOR.dialogCommand('code_sc_generatorDialog'));
if (editor.ui.addButton) {
editor.ui.addButton('CSH', {
label: 'Code Syntax Highlighting',
command: 'csh_command',
icon: this.path + 'images/code_sc_button.png'
});
}
CKEDITOR.dialog.add('code_sc_generatorDialog', this.path + 'dialogs/code_sc_generator.js');
}
});
})(jQuery, Backdrop, CKEDITOR);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment