Permalink
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 931 Bytes
layout title title_nav description keywords
default
jQuery integration
jQuery
Add custom logic to render TinyMCE inside jQuery dialogs.
integration integrate jquery javascript

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(".mce-window, .moxman-window").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.