Krichtexteditor In A Popup

Hi.

I’d like to include a jquery popup with TinyMCE editor.

I’m using krichtexteditor extension, and the jQuery UI extension to generate the popup.

The problem is that when the dialog is opened a textarea is prompted, but without TinyMCE.

Looking at the source, I see the editor is initialized in run(), but that code is included into the JSON response to create dialog content.

While debugging the request, I see all the JS part is not included into the returned text.

How can I make it work?

thanks