tinymce- customize tinyMCEPopup.close

I developed a custom file manager for tinymce. But even if adding image to tinymce in firefox works, it does not work in ie with the following code block.

 tinyMCE.activeEditor.selection.setContent("<img src='" + $(this).attr("data-url") + "' style='width:150px; height:150px;' />");

In internet Explorer, it deletes all contents in tinymce and add the image because of empty "tinyMCE.activeEditor.selection". About this I found following post. What's the best way to set cursor/caret position?

But after user open file manager popup , s/he may want to close it without adding file. If this happens, I should delete the html that I add for cursor/caret position to find later selection in ie.

I tried add a click event to close link of the popup, however it does not work. I need to sense popup close and customize it.


with this code , I am able to delete caret html.

 $($(parent.document).find("a.mceClose")[0]).mousedown(function () {
                if ($.browser.msie) {
                    var ed = tinyMCE.activeEditor;
                    var html = $(ed.dom.select('div#filemanager_wrapper')[0]).html();


Need Your Help

Differences between dir and ls FTP Commands


Hello we have made a little program to upload an .zip file to an FTP server, and when I connect to the FTP server with FileZilla to see everything is ok I can't see the uploaded file.

Selecting values present in one column but not in all other columns

php mysql sql select

Suppose I have columns col1, col2, col3, col4 in myTable and I need to print out the values exclusive to only one column .