title: HTML to word converting using javascript
body: <p>I am trying to convert HTML to word (.docx) by using JavaScript. I am using this <a href="http://www.jqueryscript.net/other/Export-Html-To-Word-Document-With-Images-Using-jQuery-Word-Export-Plugin.html" rel="nofollow">http://www.jqueryscript.net/other/Export-Html-To-Word-Document-With-Images-Using-jQuery-Word-Export-Plugin.html</a> plug-in for conversion. But this one is just converting every thing inside the HTML file. i mean with head tag all elements even with some content inside. output file looks like this</p>
  
  <blockquote>
    <p>Mime-Version: 1.0 Content-Base:
    file:///home/userprofile/JsWs/sample.html Content-Type:
    Multipart/related; boundary="NEXT.ITEM-BOUNDARY";type="text/html"</p>
    
    <p>--NEXT.ITEM-BOUNDARY Content-Type: text/html; charset="utf-8" Content-Location: file:///home/userprofile/JsWs/sample.html</p>
    
    <p>    </p>
    
    <p>  </p>
  
  <pre><code>  &lt;p&gt;this is going to be paragraph &lt;/p&gt;
  
    &lt;/body&gt;&lt;/html&gt;
  </code></pre>
    
    <p>--NEXT.ITEM-BOUNDARY--</p>
  </blockquote>
  
  <p>and <strong>my html is</strong> </p>
  
  <pre><code>&lt;html&gt; 
      &lt;head&gt;
          &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script src="FileSaver.js"&gt;&lt;/script&gt;
          &lt;script src="jquery.wordexport.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script type="text/javascript"&gt;
          jQuery(document).ready(function($) {
              $("a.word-export").click(function(event) {
                  $("#export-content").wordExport();
              });
          });
          &lt;/script&gt;
          &lt;div id="export-content"&gt;
  
          &lt;p&gt;this is going to be paragraph &lt;/p&gt;
  
          &lt;/div&gt;
  
          &lt;a class="word-export" href="javascript:void(0)"&gt; Export as .doc &lt;/a&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Help me out how can i convert content of HTML in word.</p>