Template Literals #1628
Answered
by
dolanmiu
GregPetropoulos
asked this question in
Q&A
Template Literals
#1628
-
I want to use template literals to dynamically generate a string in a new Paragraph. Why doesn't this work? const allBodyParagraphs = paragraphs.map((paraItem) => {
return new Paragraph(`${paraItem.paragraph}`)
}) |
Beta Was this translation helpful? Give feedback.
Answered by
dolanmiu
Aug 15, 2022
Replies: 1 comment
-
You need to add it in a new Paragraph({
children: [
new TextRun("Hello World"),
],
}), |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
GregPetropoulos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to add it in a
TextRun
, paragraphs must have a list ofTextRun
underchildren
: