CKEDITOR 4获取多个列表中的选定列表项

CKEDITOR 4获取多个列表中的选定列表项,ckeditor,ckeditor4.x,Ckeditor,Ckeditor4.x,在我的CKEDITOR 4插件中,我有一个select元素,带有multiple:true,settings 如何获取选定的元素 commit:函数(数据){ console.log(this.getValue()); } 这一个只返回第一个选择 代码部分: { type: 'select', label: 'Role list', id: 'role', label: 'Role list', multiple: true, controlSt

在我的CKEDITOR 4插件中,我有一个select元素,带有
multiple:true,
settings

如何获取选定的元素

commit:函数(数据){
console.log(this.getValue());
}

这一个只返回第一个选择

代码部分:

{
    type: 'select',
    label: 'Role list',
    id: 'role',
    label: 'Role list',
    multiple: true,
    controlStyle: 'min-height: 10em;width:100%;',
    style: 'min-height: 10em;width: 100%;',
    items: roleListJSON,
    setup: function (data) {
        //todo: setup selection from data.roles
    },
    commit: function (data) {
        var selected_values = this.getValue();  //its wrong

    }
}

我尝试了这个.getValues(),但不起作用。什么是神奇的功能?:)一种解决方案是使用Jquery:var selected_values=$(this.getInputElement().$).val();但必须有一个与ckeditor兼容的方法:)