Paragraphs need text run objects. To create text:
text run
var text = new docx.TextRun("My awesome text here for my university dissertation"); paragraph.addRun(text);
Text objects have methods inside which changes the way the text is displayed.
More info here
text.bold();
text.italic();
text.underline();
text.strike();
text.doubleStrike();
text.superScript();
text.subScript();
text.allCaps();
text.smallCaps();
Sometimes you would want to put text underneath another line of text but inside the same paragraph.
text.break();
What if you want to create a paragraph which is bold and italic?
paragraph.bold().italic();
There was an error while loading. Please reload this page.