var doc = new jsdocx.Document() doc.generate().then((content) => { saveAs(content, filename) })
var doc = new jsdocx.Document() doc.addParagraph().addRun().addText('Hello World!') doc.generate().then((content) => { saveAs(content, filename) })
var doc = new jsdocx.Document() var p = doc.addParagraph() p.addFormat().addHAlignment().setVal('center') p.addRun().addText('...') doc.generate().then((content) => { saveAs(content, filename) })
var doc = new jsdocx.Document() var r = doc.addParagraph().addRun() r.addFormat().addBold() r.addText('...') doc.generate().then((content) => { saveAs(content, filename) })
var doc = new jsdocx.Document() doc.addCols().setNum(2) doc.addParagraph().addRun().addText('...') // You can also generate a custom section instead: // // var s = doc.addSection() // s.addCols().setNum(2) // s.addParagraph().addRun().addText('...') doc.generate().then((content) => { saveAs(content, filename) })
var doc = new jsdocx.Document() var t = doc.addTable() t.addFormat().addBorders().setAll(1) t.addRow().addCell() doc.generate().then((content) => { saveAs(content, filename) })
MIT License
With ♥ by Emanuele Bertoldi