Fancybox and tinyMCE integration

I have a problem installing tinyMCE in a Fancybox popup Here is the code

$(document).ready(function() { $(".reply_button").fancybox({ 'scrolling' : 'no', 'titleShow' : false, 'onClosed' : function() { $.fancybox.close(); $("#login_error").hide(); } ,'onComplete': function(){ $("textarea.editor").tinymce({ script_url: "resources/scripts/tiny_mce", mode: "textareas", theme: "advanced", }); } }); }); 

The problem is when the window opens, and then I close it, the gray layer covering the page, and I have to refresh the page to return to the site.

and I have this error trace in the console

Error: uncaught exception: [Exception ... "Node cannot be used in a document other than the one in which it was created" code: "4" nsresult: "0x80530004 (NS_ERROR_DOM_WRONG_DOCUMENT_ERR)" location: ""

+4
source share
1 answer

Looks like a bug in TinyMCE. I unpacked the script and it dies in line 7687 (both halves of the if cause an error, the line wrapped here for readability):

 if (i.compareBoundaryPoints(i.START_TO_START, g.selectedRange) === 0 && i.compareBoundaryPoints(i.END_TO_END, g.selectedRange) === 0) 

You may want to create a bug report , use different ones , or do both. I myself have not used TinyMCE, but it seems that there are a number of valid complaints about its size (bloated) and errors (numerous).

+3
source

All Articles