Java 链接对话框窗口打开时,模式窗口中的CKeditor关闭
我在引导程序中遇到了模态窗口问题。默认行为设置为在容器外部单击时关闭(必须保持这种状态)。CKEditor嵌套在该窗口中。除了在文本中添加链接外,一切都很好。在这种情况下,Ckeditor将打开一个新的对话框窗口,在编辑该链接时,Ckeditor将关闭。我知道原因。引导程序无法识别其子项,因此无法识别链接对话框窗口上的单击,就像在编辑器之外一样。Java 链接对话框窗口打开时,模式窗口中的CKeditor关闭,java,jquery,ckeditor,Java,Jquery,Ckeditor,我在引导程序中遇到了模态窗口问题。默认行为设置为在容器外部单击时关闭(必须保持这种状态)。CKEditor嵌套在该窗口中。除了在文本中添加链接外,一切都很好。在这种情况下,Ckeditor将打开一个新的对话框窗口,在编辑该链接时,Ckeditor将关闭。我知道原因。引导程序无法识别其子项,因此无法识别链接对话框窗口上的单击,就像在编辑器之外一样。 是否有方法更改该行为,以便链接对话框窗口将被视为CKEditor的一部分 这段代码表示我的项目中基于引导的ckeditor。提前干杯 (functio
是否有方法更改该行为,以便链接对话框窗口将被视为CKEditor的一部分 这段代码表示我的项目中基于引导的ckeditor。提前干杯
(function ($) {
var MegaEditor = function (options) {
this.init('megaeditor', options, MegaEditor.defaults);
};
$.fn.editableutils.inherit(MegaEditor, $.fn.editabletypes.abstractinput);
$.extend(MegaEditor.prototype, {
render: function () {
MegaEditor.superclass.render.call(this);
//ctrl + enter
this.$input.keydown(function (e) {
if (e.ctrlKey && e.which === 13) {
$(this).closest('form').submit();
}
});
},
value2html: function(value, element) {
$(element).html(value);
},
html2value: function(html) {
return html;
},
input2value: function() {
var wartosc = CKEDITOR.instances[this.$input.get(0).name].getData();
return wartosc;
},
activate: function() {
if(this.$input.is(':visible')) {
$.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length);
if(CKEDITOR.instances[this.$input.get(0).name]) {
CKEDITOR.remove(this.$input.get(0));
}
CKEDITOR.replace( this.options.editorId,
{
//extraPlugins : 'uicolor',
language : 'pl',
uiColor: '#C9E3F2',
scayt_autoStartup: false,
forcePasteAsPlainText: false,
toolbarCanCollapse: false,
toolbar :
[
['Bold','Italic','Underline','Strike','-','Undo','Redo','-','Outdent','Indent'],
['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink'], ['-','Source']
]
} );
this.$input.focus();
}
}
});
MegaEditor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, {
/**
@property tpl
@default <textarea></textarea>
**/
tpl:'<textarea id="ckEditor"></textarea>',
/**
@property inputclass
@default input-large
**/
inputclass: 'input-large',
/**
Placeholder attribute of input. Shown when input is empty.
@property placeholder
@type string
@default null
**/
placeholder: null ,
editorId: 'ckEditor'
});
$.fn.editabletypes.megaeditor = MegaEditor;
}(window.jQuery));
(函数($){
var MegaEditor=功能(选项){
this.init('megaeditor',options,megaeditor.defaults);
};
$.fn.editableutils.inherit(MegaEditor,$.fn.editabletypes.abstractinput);
$.extend(MegaEditor.prototype{
渲染:函数(){
MegaEditor.superclass.render.call(this);
//ctrl+enter
此.$input.keydown(函数(e){
如果(e.ctrlKey&&e.which==13){
$(this).closest('form').submit();
}
});
},
value2html:函数(值、元素){
$(元素).html(值);
},
html2value:函数(html){
返回html;
},
input2value:函数(){
var wartosc=CKEDITOR.instances[this.$input.get(0).name].getData();
返回OSC;
},
激活:函数(){
如果(此.$input.is(':visible')){
$.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length);
if(CKEDITOR.instances[this.$input.get(0.name)]){
CKEDITOR.remove(this.$input.get(0));
}
CKEDITOR.replace(this.options.editorId,
{
//extraPlugins:'uicolor',
语言:“pl”,
uiColor:“#C9E3F2”,
斯盖特:错,
forcePasteAsPlainText:false,
toolbarCanCollapse:错误,
工具栏:
[
['Bold'、'Italic'、'Underline'、'Strike'、'-'、'Undo'、'Redo'、'-'、'Outdent'、'Indent'],
['NumberedList'、'BulletedList'、'-'、'JustifyLeft'、'JustifCenter'、'JustifRight'、'JustifBlock'],
['Link','Unlink'],['-','Source']
]
} );
这是.$input.focus();
}
}
});
MegaEditor.defaults=$.extend({},$.fn.editabletypes.abstractinput.defaults{
/**
@物业第三方物流
@违约
**/
第三方物流:,
/**
@属性输入类
@默认输入大
**/
inputclass:'input large',
/**
输入的占位符属性。输入为空时显示。
@属性占位符
@类型字符串
@默认空值
**/
占位符:空,
社论:“编辑”
});
$.fn.editabletypes.megaeditor=megaeditor;
}(window.jQuery));