-
-
Notifications
You must be signed in to change notification settings - Fork 578
Text
Dolan edited this page Nov 19, 2017
·
2 revisions
Paragraphs need text run objects. To create text:
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();