title: TinyMCE - multiple configs/inits with jQuery
body: <p>I'm building a site based on jQuery and Ajax, almost every element on the site is created with jQuery.</p>
  
  <p>This can be very effective because it releases a lot of work of generating the pages from the server.</p>
  
  <p>One of the problems I usually encounter is that plugins is usually not designed for this kind of programming, that the elements is created after the site is loaded.</p>
  
  <p>tinyMCE got a jQuery version, but it just work to install and initiate right away.</p>
  
  <pre><code>var textarea = $("&lt;textarea/&gt;");
  and then just play with
  textarea.tinymce({ 
       script_url : 'js/tiny_mce/tiny_mce.js',
       theme : "advanced"
       configs:yeah...
  });
  </code></pre>
  
  <p>When I try to do it on one more, textarea2.tinymce({ ease:peace }); then it dose not load, it hides the textarea2 but no editor is shown, as far as I understand its because the editor is already created in the DOM.</p>
  
  <p>I don't want to remove the first one, I just want to initiate one (or more:) more.
  I have tried to use tinyMCE.init with editor_selector:mceAdvanced1 but when I later create the $("").addClass("mceAdvanced1") with jQuery it don't want to load with the editor.</p>
  
  <p>or like this</p>
  
  <pre><code>var ed = new tinymce.Editor({
      some_setting : 1
  });
  var textarea = $("&lt;textarea/&gt;");
  ed.add(textarea);
  </code></pre>
  
  <p>And I tried to store the jQuery version in a variable but dose not work if I don't append it right away, and its not possible to move it after its created or clone it...</p>
  
  <p>It would be very nice to be able to have the editor on more than one place on the site without needing to reload it, so therefore I'm asking for your help so I could solve this.</p>
  
  <p>Thanks for your effort.</p>
  
  <p>EDIT</p>
  
  <p>Since the jQuery version of TinyMCE did't work like I thought, I have changed my approach how to solve it, but through, its would be real nice to see a refinement of the jQuery version so you can work with more than one instances.
  The solution is to initiate 2 different editors when the page loads and just hide them and when the elements are created where they will be used just append the editor to it.</p>
  
  <p>This is how I do it,
  Initiate the editor...</p>
  
  <pre><code>tinyMCE.init({
      mode : "exact",
      elements : "popup",
      // General optionss...
  });
  </code></pre>
  
  <p>And where I build the site with jQuery, I just apply it this way...</p>
  
  <pre><code>tinyMCE.execCommand('mceRemoveControl', false, 'popup');
  dd.append($("#popupContainer"));    
  $("#popupContainer").show();
  tinyMCE.execCommand('mceAddControl', false, 'popup');
  tinyMCE.activeEditor.setContent('');
  </code></pre>