update demo2 to test space preservation

This commit is contained in:
felipe
2017-04-14 11:09:08 +02:00
parent b1c8b2beb8
commit 99b7a03b8a

View File

@ -64,7 +64,11 @@ doc.createParagraph()
doc.createParagraph('An aside, in light gray italics and indented').style('aside');
doc.createParagraph('This is normal, but well-spaced text').style('wellSpaced');
doc.createParagraph('This is normal');
const para = doc.createParagraph();
para.createTextRun('This is a bold run,').bold();
para.createTextRun(' switching to normal ');
para.createTextRun('and then underlined ').underline();
para.createTextRun('and back to normal.');
const exporter = new docx.LocalPacker(doc, styles, undefined, numbering);
exporter.pack('test.docx');