Created
August 9, 2018 17:03
-
-
Save alexfinnarn/900e151d0ab1e43cd208a2d8ed33fb59 to your computer and use it in GitHub Desktop.
final plugin code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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