Fix descriptions of demos

This commit is contained in:
Dolan
2019-02-26 22:20:20 +00:00
parent 918faf59c3
commit 5ae541a40d
10 changed files with 14 additions and 16 deletions

View File

@ -1,4 +1,4 @@
// Add images to header and footer
// Add image to table cell
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Media, Packer, Table } from "../build";
@ -7,7 +7,7 @@ const doc = new Document();
const image = Media.addImage(doc, fs.readFileSync("./demo/images/image1.jpeg"));
const table = new Table(2, 2);
table.getCell(1, 1).addContent(image.Paragraph);
table.getCell(1, 1).addParagraph(image.Paragraph);
// doc.createParagraph("Hello World");
doc.addTable(table);