所以,例如,我有CKEDITOR插件
CKEDITOR.plugins.add('internallink', {
icons: 'internallink',
toolbar: 'insert,100',
init: function (editor) {
editor.addCommand('internallink', new CKEDITOR.dialogCommand('internalLinkDialog'));
editor.ui.addButton('InternalLink', {
label: 'Internal link',
command: 'internallink',
toolbar: 'links'
});
CKEDITOR.dialog.add('internalLinkDialog', function (editor) {
return {
title: 'Internal link',
minWidth: 600,
minHeight: 400,
contents: [
{
id: 'tab-main',
label: 'Select page',
elements: [
{
type: 'select',
id: 'page_tree',
label: 'Select page',
items: [[1],[2],[3]],
onChange: function() {
...
}
},
]
}
],
onShow: function () {
...
},
onOk: function () {
...
},
};
});
}
});

中获取此值
onChange: function () {
...
}

请告诉我,我该怎么做:)
答案 0 :(得分:1)
嗯,这个问题是:
onChange: function() {
alert( 'Current value: ' + this.getValue() );
}
http://docs.ckeditor.com/#!/api/CKEDITOR.dialog.definition.select