Last updated 2 months ago by maxtan .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @maxtan/tohtml 
SYNC missed versions from official npm registry.


Node environment dependency

Node environment requires more than v10

Chinese document

Install as package dependent

npm install @maxtan/tohtml

or using yarn:

yarn add @maxtan/tohtml

Use as package dependency

const toHtml = require('@maxtan/tohtml');
const path = require('path');
//Basic use
const testInit= async () => {
    const workOptions = {
        targetPath : path.resolve(__dirname,'./test.docx'), //Source file path
        templatePath : path.resolve(__dirname,'./test.template.html'),  //Template path
        isWirteFile : false //Write file or not
    const htmlStr = await toHtml.compiledToHtml(workOptions);

Configurable parameters

Parameter name describe type Remarks
targetPath Source file path string Incoming absolute address
templatePath Template path string Using lodash template syntax
isWirteFile Write file or not boolean Method calls usually do not write to files. When calling the 'compiledtohtml' method, the default is false. When calling the 'docxtohtml' method, the default is true

Install as command line tool

npm install @maxtan/tohtml -g

Command line use

tohtml ./test.docx

Custom template

tohtml ./test.docx -t test.template.html

Current Tags

  • 1.0.1                                ...           latest (2 months ago)

2 Versions

  • 1.0.1                                ...           2 months ago
  • 0.0.1                                ...           5 months ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 14
Dependencies (3)
Dev Dependencies (3)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |