Hello,
I have a plugin to show a dialog whit three tabs.
And I'd like to perform some operations over the content on tab change event.
How can I capture that event?
My actual dialog looks like this:
CKEDITOR.dialog.add('customDialog', function (instance) {
return {
title: 'Custom Plugin',
minWidth: 550,
minHeight: 200,
contents: [
{
id: 'tab1',
label: 'tab1',
title: 'tab1',
elements: [
{
type: 'html',
html: html1
}
]
}, {
id: 'tab2',
label: 'tab2',
title: 'tab2',
elements: [
{
type: 'html',
html: html2
}
]
}, {
id: 'tab3',
label: 'tab3',
title: 'tab3',
elements: [
{
type: 'html',
html: html3
}
]
}
]
}; // return
});
CKEDITOR.on('dialogDefinition', function (e) {
var dialogName = e.data.name;
var dialog = e.data.definition.dialog;
dialog.on('show', function () {
//Do some init functions
//HERE I'd tried to capture the tab changed event from the css class and click event, but it is just some temporal crappy workaround
});
});
var command = new CKEDITOR.dialogCommand('customDialog', {
allowedContent: 'a[*](*)'
});
editor.addCommand('_myLaunchDialog', command);
editor.execCommand("_myLaunchDialog");