Opened 15 years ago
Last modified 14 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'.

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.