请告诉我如何按下显示(html)使其返回。 对话框js文件
onOk: function() {
var dialog = this;
var collection_group_n = dialog.getValueOf('tab-basic', 'migx_collection_group_n');
var vk_post_id = dialog.getValueOf('tab-basic', 'vk_post_id');
var align = dialog.getValueOf('tab-adv', 'align');
var xs = dialog.getValueOf('tab-adv', 'xs');
var sm = dialog.getValueOf('tab-adv', 'sm');
var md = dialog.getValueOf('tab-adv', 'md');
var lg = dialog.getValueOf('tab-adv', 'lg');
var result = '[!$ImgGroup? &group_id="' + migx_collection_group_n + '"]';
}
plugin.js
editor.addCommand('insertImgCollection', new CKEDITOR.dialogCommand('imgGroupDialog', {
} ) );
答案 0 :(得分:0)
我忘记了重置缓存。 onOk:function(){ var dialog = this;
var collection_group_n = dialog.getValueOf('tab-basic' , 'collection_group_n');
var vk_post_id = dialog.getValueOf('tab-basic', 'vk_post_id');
if (collection_group_n == '' && vk_post_id == '') {
alert("Не заполнены главные параметры!");
return;
} else if (collection_group_n != '' && vk_post_id != '') {
alert("Только один из главных параметров должен быть!");
return;
}
var align = dialog.getValueOf('tab-adv', 'align');
var xs = dialog.getValueOf('tab-adv', 'xs');
var sm = dialog.getValueOf('tab-adv', 'sm');
var md = dialog.getValueOf('tab-adv', 'md');
var lg = dialog.getValueOf('tab-adv', 'lg');
var result = '[!$ImgGroup? ' + (collection_group_n != '' ? '&group_id="' + collection_group_n + '"' : '&post_id="' + vk_post_id + '"') + (align != '' ? ' &align="' + align + '"' : '') + (xs != '' ? ' &xs="' + xs + '"' : '') + (sm != '' ? ' &sm="' + sm + '"' : '') + (md != '' ? ' &md="' + md + '"' : '') + (lg != '' ? ' &lg="' + lg + '"' : '') + ']';
this._.editor.insertText(result);
}