HTML Docx Mini - Example Usage

Basic Usage:

// Select the HTML element to export
const element = document.getElementById('content');

// Export to DOCX
HtmlDocxMini.exportHTMLDivToDocx(
    element, 
    'my-document.docx',
    {
        creator: 'Your Name',
        title: 'Document Title',
        description: 'Document Description'
    }
);
        

Sample Document

This is a demonstration of the HTML to DOCX converter library.

Features

Text Formatting

The library processes various HTML elements and converts them to their DOCX equivalents. This includes paragraphs, headings, lists, and more.

Subsection Example

This is content within a subsection. The hierarchical structure of your HTML document is preserved in the exported DOCX file.

Lists Example

Unordered List

Ordered List

  1. Step one
  2. Step two
  3. Step three

Graphics Support

The library can handle both regular images and SVG graphics:

SVG

This SVG graphic will be converted to a PNG image and embedded in the DOCX file.