How can I display an alert with ckeditor if a button is pressed?
Here's the code:
$(document).ready(function () {
$(".cke_button__bold").click(function () {
editor.on("CKEDITOR.cke_button__bold",CKEDITOR.cke_button_on);
function handleAfterCommandExec(evt){
var commandName = CKEDITOR.command.cke_button__bold;
// For 'bold' commmand
if (commandName == 'cke_button__on')
{
alert("Bold button pressed!");
}
}
});
});