TinyMCE在jqueryUI模态对话框中打开 [英] TinyMCE opened in jqueryUI modal dialog
问题描述
在jqueryUI模态对话框中使用tinyMCE时,我不能使用超链接或插入图像"功能.
When using tinyMCE in a jqueryUI modal dialog, I can't use the hyperlink or 'insert image' features.
基本上,经过大量搜索,我发现了这一点:
Basically, after lots of searching, I've found this:
http://www.tinymce.com/develop/bugtracker_view.php?id=5917
奇怪的是,对我来说,它缝的很少是tinyMCE问题,而更多的是jqueryUI问题,因为当jqueryUI的modal属性设置为false时,该问题就不存在了.
The weird thing is that to me it seams less of a tinyMCE issue and more of a jqueryUI issue since the problem is not present when jqueryUI's modal property is set to false.
在更丰富的表单中,我看到发生的事情是,每当tinyMCE失去焦点时,表单中的第一个元素都会获得焦点,即使它不是焦点/单击的焦点.
With a richer form I saw that what happens is that whenever the tinyMCE loses focus, the first element in the form gets focus even if it's not the one focused / clicked.
一些JavaScript大师是否知道如何保持对话框模态并使tinyMCE工作?
Does some JavaScript guru have any idea how I might be able to keep the dialog modal and make tinyMCE work?
推荐答案
在覆盖_allowInteraction不会的情况下,这为我修复了该问题:
This fixed it for me when overriding _allowInteraction would not:
$(document).on('focusin', function(e) {
if ($(event.target).closest(".mce-window").length) {
e.stopImmediatePropagation();
}
});
我真的不能为此功劳.我是从 TinyMCE论坛上的该帖子中获得的.
(他们已将其bugtracker移至github. tinymce/issues/703 是对应的github问题.)
I can't really take credit for it. I got it from this thread on the TinyMCE forums.
(They have moved their bugtracker to github. tinymce/issues/703 is the corresponding github issue.)
这篇关于TinyMCE在jqueryUI模态对话框中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!