Configurable docx frontend #990
weilies
started this conversation in
Ideas / Requests
Replies: 1 comment
-
You can if you think about it declaratively Imagine you have a function, which has inputs, then inside the function, it will create the docx in one single swoop. export const createDocument(inputs: MyInputs): Document => {
const paragraphs = inputs.coolStuff.map((e) => {
return new Paragraph({
text: e
});
});
return new Document({
sections: [{
children: [...paragraphs]
}]
});
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I sort of able to write simple DOCX doc. Is it possible to make it "configurable" via angular form?
The intention is to allow admin to create a configurable docx instead of making the whole program inside code?
For a working code below
Is it possible to make the "new Paragraph...", "new ImageRun..." define via front-end? Coz they are elements under children:[] array. But i don't understand how to loop them? Is it possible?
Beta Was this translation helpful? Give feedback.
All reactions