Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 686 Bytes

README.md

File metadata and controls

46 lines (31 loc) · 686 Bytes

jsdocx

jsdocx

Generate .docx files from JS

Demo

https://zuck.github.io/jsdocx-demo/

Install

$ npm install jsdocx

Build

$ git clone https://github.com/zuck/jsdocx.git
$ cd jsdocx
$ npm install
$ npm run build

How to use

import jsdocx from 'jsdocx'

let doc = new jsdocx.Document()
let p = doc.addParagraph()
p.addRun().addText('Hello World!')
p.addFormat().addHAlignment().setVal('center')
doc.generate().then((content) => {
  // e.g. saveAs(content, 'hello.docx')
})

License

The MIT License (MIT)

Read more...

Copyright (c) 2017 Emanuele Bertoldi