I've written a plugin called AjaxSave. How can I make its toolbar button use the regular save icon?
Apparently this forum disables .txt attachments!?? Plugin pasted below. To use it, throw something like this into your config:
var config = {
on: { save: function (evt) { evt.editor.destroy() } }
}This is just until a proper solution can be found for this issue: http://dev.fckeditor.net/ticket/4507
(function()
{
var saveCmd =
{
modes : { wysiwyg:1, source:1 },
exec : function( editor )
{
editor.fire('save');
}
};
var pluginName = 'ajaxsave';
CKEDITOR.plugins.add( pluginName,
{
init : function( editor )
{
var command = editor.addCommand( pluginName, saveCmd );
editor.ui.addButton( 'AjaxSave',
{
label : editor.lang.save,
command : pluginName
});
}
});
})();

Re: Using an existing icon for a new plugin?
Re: Using an existing icon for a new plugin?
It would be really useful to be able to reuse stock icons for custom plugins wouldn't it? If that's currently impossible, should I open a ticket?
Re: Using an existing icon for a new plugin?
By default you have this code.
.cke_button_save .cke_icon{background-position:0 -32px;}You can change it for your new button.
.cke_button_your_pluging_name .cke_icon{background-position:0 -32px;}Re: Using an existing icon for a new plugin?
Thanks yfrommelt. That should work fine.

Now if only plugins could supply their own css file.