Opened 11 years ago

Closed 11 years ago

#1712 closed Bug (invalid)

AddItem - Execute with plugin

Reported by: datalink Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Think it's a bug, but I'm not sure.

I wrote a plugin for a additional specialcombo. I fill the selectbox with this._Combo.AddItem( StyleDefinition, OptionName ), all works fine, but to display the Option ...prototype.Execute = function( OptionName, StyleDefinition ) is needed.

You can test it with this code: http://www.fckeditor.net/forums/viewtopic.php?f=6&t=7983

Attachments (1)

1712.patch (769 bytes) - added by Artur Formella 11 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 11 years ago by Artur Formella

Resolution: invalid
Status: newclosed

It is not a bug.

function FCKToolbarSpecialCombo_OnSelect( itemId, item )
{
	FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).Execute( itemId, item ) ;
}

If you want change it you should overwrite OnSelect:

this._Combo.OnSelect = FCKToolbarSpecialCombo_OnSelect ;

I attached the patch to your plugin. Now SetLabel works.

StyleComboObj._Combo.SetLabel( style.Label ) ;

Changed 11 years ago by Artur Formella

Attachment: 1712.patch added
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy