Opened 13 years ago

Last modified 13 years ago

#7655 confirmed Bug

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 (1)

comment:1 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy