当前位置: 首页 > 文档资料 > tinyMCE 帮助文档 >

jQuery integration

优质
小牛编辑
128浏览
2023-12-01

TinyMCE in a jQuery UI Dialog

You need to add some custom logic when rendering TinyMCE instances inside jQuery UI dialogs since it blocks all focus in calls of elements outside the dialog. Check this fiddle out for a working example.

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

A note about integrations

Note: We are pleased to provide integrations/code guidance to help you build great products with TinyMCE. If you have queries about this integration, please join the TinyMCE Community.