首页 > 解决方案 > TinyMCE 菜单在引导模式中不起作用

问题描述

将 TinyMCE 编辑器放置在引导模式中时,编辑器可见且正常运行,但是单击菜单项时,该菜单不显示。

标签: csstwitter-bootstraptinymce

解决方案


Bootstrap 会阻止focusin来自对话框外元素的所有调用。要在 Bootstrap 对话框中呈现 TinyMCE 实例,请添加以下代码:

// Prevent Bootstrap dialog from blocking focusin
$(document).on('focusin', function(e) {
  if ($(e.target).closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
    e.stopImmediatePropagation();
  }
});

这是一个例子: http: //fiddle.tinymce.com/gRgaab


推荐阅读