html-docx-js-typescript
Version:
Convert HTML documents to docx format.
21 lines (15 loc) • 426 B
text/typescript
export const mhtDocumentTemplate = (htmlSource: string, contentParts: string) => {
return `MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=mhtDocumentPart"
------=mhtDocumentPart
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/fake/document.html
${htmlSource}
${contentParts}
------=mhtDocumentPart--
`
}