I could successfully implement a plugin for fckeditor in a drupal environment to get me a button in the dialog which responds to onclick events. However I don't manage it to get called e.g. an existing style function, e.g. I just want the button to color the selected text in blue.
I tried to somehow attaching the color command onlick event to the own button event kind of like
but that's probably just utterly wrong.
The plugin code is
I have ckedior Version 2.6.5 running.
thanks in advance
I tried to somehow attaching the color command onlick event to the own button event kind of like
AddEventListener(button, 'click', FCKTextColorCommand_OnClick, [ this, '#00f' ] ) ;
but that's probably just utterly wrong.
The plugin code is
(function ($) { Drupal.wysiwyg.plugins['bluecolorbutton'] = { invoke: function(data, settings, instanceId) { if (CKEDITOR) { var editor = CKEDITOR.instances[instanceId]; if (editor) { CKEDITOR.dialog.add('bluecolor',function(a){ // just want to route to the fcktextcolorcommand here... }); CKEDITOR.dialog(editor, 'bluecolor'); } } } }; })(jQuery);
I have ckedior Version 2.6.5 running.
thanks in advance