title: TinyMCE & Fancybox - editor won't work on second view
body: <p>I've added TinyMCE to my project, and am using it on a text area which pops up in a fancybox.  The first time I action it, it works fine, but if I then close it and try to open it again, it doesn't let me type in the box.  It looks okay, just that the text area is kind of greyed out, and won't accept input.  If I click any of the buttons (bold, italic, justify, font selection etc.), the console gives the error "j is null".</p>
  
  <p>I've found some similar problems on the web, but couldn't find anyone with a similar set up to mine, so I'm confused.  I think the problem may be that I'm trying to add a new TinyMCE instance every time the fancybox is shown, and then I need to destroy it afterwards, before re-initialising it, maybe?  But I'm not sure how to destroy it, or even if that's what I need to do.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;head&gt;...&lt;/head&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
   function tinyMCE_setup() {
     tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
        theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,forecolor",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,|,link,unlink,code",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "center",
        //theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true
     });
  }
   function tinyMCE_remove() {
     //tinyMCE.destroy();
  }
  &lt;/script&gt;
  
  ... some html ...
  
   &lt;!-- Text --&gt;
   &lt;div style="display:none"&gt;
    &lt;div id="addtext" class="addcontent"&gt;
      &lt;p class="headline bg_text"&gt;add text or caption&lt;/p&gt;
      &lt;form id="addText" name="addText" action="add_text.php" method="post" onSubmit="return checkAddText()"&gt;
       &lt;label&gt;enter your caption or text here&lt;/label&gt;
       &lt;textarea id="text" name="text" rows="10" style="clear: both; margin-bottom: 14px; margin-top: 5px; width: 466px"&gt;&lt;/textarea&gt;
        &lt;input type="image" name="submit" id="imageField2" src="images/site/button_text_submit.gif" onMouseOver="this.src='images/site/button_text_submit_over.gif'" onMouseOut="this.src='images/site/button_text_submit.gif'"/&gt;
      &lt;/form&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  
  ... more html ...
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;script&gt;
  $(document).ready(function() {
  
   $("a#link_addtext").attr("href", "#addtext");
  
   $('a#link_addtext').fancybox({
      'hideOnContentClick': false,
          'padding' : 0,
      'overlayOpacity'    :   0.1,
          'onComplete': function(){
        tinyMCE_setup();
      }
      });
  
    ... other javascript ..
  }
  &lt;/script&gt;
  </code></pre>