Html to docx not working for simple code

I tried by converting html file to docx with below html code:

<h1>docxtemplater</h1>
<p><strong>docxtemplater</strong> is a library to generate docx/pptx
documents from a docx/pptx template. It can replace {placeholders}
with data and also supports loops and conditions. The templates can be
edited by non-programmers, eg for example your clients.</p>

Docx I got is this:
hsdld.docx (11.8 KB)

Then, I tried with a html file with below code:

<h1>docxtemplater</h1>

<p><strong>docxtemplater</strong> is a library to generate docx/pptx
documents from a docx/pptx template. It can replace {placeholders}
with data and also supports loops and conditions. The templates can be
edited by non-programmers, eg for example your clients.</p>

<p>Installation: <code>npm install docxtemplater:</code></p>

<p>If you download the JS from there, you should use <code>new
Docxgen()</code> instead of <code>new Docxtemplater()</code>, because
I do not want to bring in a breaking change on a minor version change
in the docxtemplater-build repository.</p>

<p>If you download the JS from there, you should use <code>new
Docxgen()</code> instead of <code>new Docxtemplater()</code>, because
I do not want to bring in a breaking change on a minor version change
in the docxtemplater-build repository.</p>

<p>I recommend you to use the npm scripts I wrote (which can be found
    in the package.json).</p>

<code> npm install && npm run compile </code>

<p>Your version of docxtemplater will be in /build (minified and non
    minified options) and already include all dependencies</p>

<p>Create the following html</p>

<h2>Similar libraries</h2>

<p>There are a few similar libraries that work with docx, here’s a list
of those I know a bit about:</p>

<h1>Modules</h1>

<p>Functionality can be added with modules. They is yet no doc for the
modules because it is not completely mature yet, but you can open an
issue if you have any question about it.</p>

<p>Here is the list of existing modules:</p>

<h1>Professional Support</h1>

<p>I can give your company support for installing, extending,
answering support questions, or maintainning your app that runs
docxtemplater. You can find my email address on my </p>

Then I got the correct docx:
iuhuihwh.docx (8.4 KB)

Please help.

@rajatdpw
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSCLOUD-2577

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi. Any progress in this task?

@rajatdpw

We have investigated the issue and noticed that Html_Error.html is an HTML fragment. Our content type detector fails to determine the data type and assigns it a default text format.

The simplest way to fix it is to be more specific. It gives the detector more clues.

The file with the following content is detected as HTML:

<html>
<h1>docxtemplater</h1>
<p><strong>docxtemplater</strong> is a library to generate docx/pptx
documents from a docx/pptx template. It can replace {placeholders}
with data and also supports loops and conditions. The templates can be
edited by non-programmers, eg for example your clients.</p>
</html>