views:

43

answers:

1

When ever i click on B in ckEditor, i want to pop a msgbox like alert('Good Morning') . How to do this?

A: 

I guess you could do like this, for example :

var editor = CKEDITOR.instances['name_of_your_instance'],
button = editor.toolbox.toolbars[0].items[0].button,
f = button.click;
button.click = function(m) {
    alert('Good Morning');
    f(m);
};

Of course, you need to know the index of the toolbar, the index of the item, and the name of the instance ^^

Golmote