Change image API so that it now sends Images
This commit is contained in:
@ -6,8 +6,8 @@ var doc = new docx.Document();
|
||||
const table = doc.createTable(4, 4);
|
||||
table.getCell(2, 2).addContent(new docx.Paragraph('Hello'));
|
||||
|
||||
const imageData = docx.Media.addImage(doc, "./demo/images/image1.jpeg");
|
||||
table.getCell(1, 1).addContent(new docx.Image(imageData));
|
||||
const image = docx.Media.addImage(doc, "./demo/images/image1.jpeg");
|
||||
table.getCell(1, 1).addContent(image);
|
||||
|
||||
var exporter = new docx.LocalPacker(doc);
|
||||
exporter.pack('My Document');
|
||||
|
Reference in New Issue
Block a user