title: How to extract HTML content from TinyMCE Editor
body: <p>I'm a beginner on Javascript/TinyMCE and I try to understand how is it possible to get the HTML content from the editor, and show it with a simple alert() function. </p>
  
  <p>I've this minimalist config on my HTML page :</p>
  
  <pre><code>&lt;div id="tiny"&gt;
  &lt;script type="text/javascript"&gt;
  tinyMCE.init({
          // General options
          mode : "specific_textareas",
          editor_selector : "mceEditor"
  });
  &lt;/script&gt;
  &lt;/div&gt;
  
  &lt;form method="post" action="somepage"&gt;
          &lt;textarea id="myarea1" class="mceEditor"&gt;This will be an editor.&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>On the <a href="http://www.tinymce.com/wiki.php/API3:method.tinymce.Editor.getContent" rel="noreferrer">TinyMCE Website</a>, They explained that i have to use this :</p>
  
  <pre><code>// Get the HTML contents of the currently active editor
  console.debug(tinyMCE.activeEditor.getContent());
  </code></pre>
  
  <p>And <a href="https://stackoverflow.com/questions/11503320/how-to-get-the-html-code-from-tinymce-editor-using-php-javascript">here</a> too </p>
  
  <pre><code>tinymce.activeEditor.getContent()
  </code></pre>
  
  <p>I don't know why it doesn't work</p>
  
  <p>Someone have an idea ? </p>