Ticket #7655 (confirmed Bug)

Opened 4 years ago

Last modified 4 years ago

addButton nextSiblingId don't work

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

Description

On

dialogDefinition.addButton(
{
    type : 'button',
	id : 'mybutton',
	title : 'My Button',
	onClick : function() {
		myFunc();
	}
}, 'ok' );

or

dialogDefinition.addButton(
{
    type : 'button',
	id : 'mybutton',
	title : 'My Button',
	onClick : function() {
		myFunc();
	}
}, 'cancel' );

My Button is allways inserted as last Element, not before 'ok' or 'cancel'.

Change History

comment:1 Changed 4 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version set to 3.0

I have created sample code on replacebycode page:

CKEDITOR.on( 'dialogDefinition', function( ev )
	{
	var dialogName = ev.data.name;
	var dialogDefinition = ev.data.definition;
	if ( dialogName == 'mybutton' )	{
	dialogDefinition.addButton({type : 'button', id : 'mybutton', title : 'My_Button', label: 'my button', onClick : function() {alert('test');}}, 'ok' );
        }
});	

The button is always inserted after 'ok' and 'cancel' buttons.

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