title: Loading TinyMCE on dynamically loaded TextArea not working
body: <p>I am trying to create a text-area that gets dynamically loaded and automatically a TinyMCE editor gets applied.</p>
  
  <p>In spite of the many topics covering this subjects and even some tutorials I do not seem to get it working.</p>
  
  <p>I am possibly overlooking a very small item but if I only knew what..</p>
  
  <p><strong>The situation</strong></p>
  
  <p>Current install : TinyMCE 4.x + jQuery v1.10.1 
  A HTML page that loads a textarea through an AJAX call.</p>
  
  <p>The I try to initialize the TinyMCE editor on the text-area.
  There it fails.</p>
  
  <p>FireBug error console tells me : <em>ReferenceError: tinyMCE is not defined</em>
  But it has been defined. I even tried to set absolute paths.</p>
  
  <pre><code>    &lt;title&gt;jQuery test file&lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;
      &lt;script src="//code.jquery.com/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://domein1.nl/serene2/workspace/TinyMCE/tinymce_4.2.5_dev/tinymce/js/tinymce/classes/jquery.tinymce.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
      $(function() {
          $('.EditorField').tinymce({
              script_url: 'http://domein1.nl/serene2/workspace/TinyMCE/tinymce_4.2.5_dev/tinymce/js/tinymce/tinymce.jquery.min.js'
          });
      });
      &lt;/script&gt;
      &lt;script type="text/javascript"&gt;
        jQuery(document).ready(function() {
           $.get("test.php", function( EditorHTML ) {
              $("#EditorSection").html( EditorHTML );
              tinyMCE.execCommand('mceAddEditor', false, '.EditorField'); 
          });
        });
     &lt;/script&gt;
  </code></pre>
  
  <p>The HTML form code I use :</p>
  
  <pre><code>&lt;form method="post" action="result.php"&gt;
      &lt;div&gt;
          &lt;div id="EditorSection"&gt;
  
          &lt;/div&gt;
          &lt;br /&gt;
          &lt;input type="submit" name="save" value="Submit" /&gt;
          &lt;input type="reset" name="reset" value="Reset" /&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And probably also very important the code loaded by AJAX :</p>
  
  <pre><code>&lt;textarea name="TextArea1" cols="20" rows="2" class="EditorField" id="WysyWig" style="background-color: red; width: 100%; height: 700px;"&gt;
  </code></pre>
  
  <p>Dynamically loaded text-area content</p>
  
  <p>I tried multiple options here:</p>
  
  <pre><code>tinyMCE.execCommand('mceFocus', false, '.EditorField');
  tinyMCE.execCommand('mceAddEditor', true, '.EditorField');
  </code></pre>
  
  <p>Or directly by the ID itself. <em>shouldn't make a difference</em></p>
  
  <pre><code>tinyMCE.execCommand('mceAddControl', false, '#WysyWig');
  </code></pre>
  
  <p>I hope someone sees what I am overlooking.</p>