@devmm/puredocs-word-html-import
v1.0.0
Published
HTML and Markdown to .docx converter for @devmm/puredocs-word
Downloads
330
Readme
@devmm/puredocs-word-html-import
HTML/Markdown ⇄ .docx conversion for @devmm/puredocs-word.
import { HtmlToDocx, MarkdownToDocx, DocxToHtml, DocxToMarkdown } from '@devmm/puredocs-word-html-import';
import { Document } from '@devmm/puredocs-word';
// Import → .docx
const doc = new HtmlToDocx().convert('<h1>Title</h1><p><strong>Bold</strong></p>');
const doc2 = await MarkdownToDocx.fromString('# Hello\n\n- a\n- b');
// Export .docx →
const src = await Document.fromFile('./report.docx');
const html = new DocxToHtml().convert(src, { fullDocument: true });
const md = new DocxToMarkdown().convert(src);See the main README for the full library. MIT © devmm.
