This module adds a tag to include the content of an other docx document (which can be a template itself). This allows you to define subtemplates if your templates share common parts.
This module is available as part of the docxtemplater PRO plan.
This module exposes a tag to include subtemplate. The subtemplate is embeded into your document. Only the document content is embedded, footers and headers are not since they are unique for each document, so we use the headers/footers from your base template.
You will need docxtemplater v3: npm install docxtemplater
Install this module with npm install --save "$url"
Your docx should contain the text: {:include subtemplate}
. You can find a working sample at ./sample.js
You can build the es6 into js by running npm run compile
npm test
Add support for including documents with pagebreaks
Fix corruption when including equations
Add support for including charts refering to Excel documents
Add support for including documents containing Excel documents (OLEObjects)
Add support for including documents containing comments
Avoid corruption when including multiple charts with subtemplates
Bugfix corruption when including document with chart
Add support for including documents containing charts
Remove error getElementsByTagName when word/numbering.xml doesn't exist in main document
Fix bug when subtemplate contains list coming from an other module (HTML)
Images in the subtemplate when there are already some images in the headers does not cause a corruption anymore.
Links in the subtemplate are now handled correctly
Fix corruption on some word version because of duplicate styles
Add support for lists in subtemplates (ordered lists and unordered lists).
Import styles in the case when the included document defines some styles.
Handle images importing
Initial release