title: removing html, head, body tag inside TinyMCE
body: <p>I want to get only the content of the body element in TinyMce in my project and then inject that part inside another page.
  when I submit my textarea to my controller the content of tinymce does have  ,  and  html tag.</p>
  
  <p>how to get rid of them ? is there any built in functionality inside TinyMce for doing this ?</p>
  
  <p>Here is my code: </p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
          /*tinymce definition*/
          tinymce.init({
              selector: "textarea.tinymce",
              theme: "modern",
              height: 10,
              plugins: [
                   "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker example fullpage",
                   "searchreplace visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                   "save table contextmenu directionality emoticons template paste textcolor wordcount"
             ],
             content_css: "css/content.css",
             toolbar: "insertfile undo redo | styleselect | save | table | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons charmap code | hr paste pagebreak searchreplace spellchecker template visualblocks insertdatetime", 
             style_formats: [
                  {title: 'Bold text', inline: 'b'},
                  {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                  {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                  {title: 'Example 1', inline: 'span', classes: 'example1'},
                  {title: 'Example 2', inline: 'span', classes: 'example2'},
                  {title: 'Table styles'},
                  {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
              ]
           });
      &lt;/script&gt;
  </code></pre>
  
  <p>and in my html page :</p>
  
  <pre><code>    &lt;div class="page-content"&gt;
          &lt;form action="somewhere" method="post" role="form"&gt;
              Title:&lt;br/&gt; &lt;input type="text" name="title" style="width:100%"/&gt;&lt;br/&gt; &lt;br /&gt; Your Text:&lt;br/&gt;
              &lt;textarea name="content" class="tinymce" cols="30" rows="10" &gt;&lt;/textarea&gt;
              &lt;br /&gt; &lt;br /&gt; &lt;input type="submit" name="submit" /&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>