Question - render BOTH loop with multiple table rows AND placeholder replacements #776
Description
I am experimenting with your excellent library inside a browser, and while I think I understood the basics correctly I am unable to resolve the following problem: my .docx template file contains both, normal text paragraphs with several placeholder tags and a simple table with loop tags for dynamic table rows/cells.
No problem with rendering just the text part
doc.render(
{
placeholder_1 : replacement_1,
(...)
placeholder_n : replacement_n,
}
);
And no problem with just rendering the table data (using a JSON object)
doc.render(myTableData)
But I am unable to render them both in the same document. I tried all possible combinations like
doc.render(
myTableData,
{
placeholder_1 : replacement_1,
(...)
placeholder_n : replacement_n,
}
);
and others, but the output file contains always only one of the two elements correctly rendered, or the text block or the table, never both. I also tried to call doc.render( ) twice but (as I imagined) this does not work.
Is what I want to do even possible? Or am I just using the wrong syntax?
Thanks in advance for any hint.