alonrbar / easy-template-x

Generate docx documents from templates, in Node or in the browser.
MIT License
386 stars 53 forks source link

Question: is there a way to use this for text files? #97

Closed david-randoll closed 1 year ago

david-randoll commented 1 year ago

I want to possess a text file containing tags that require substitution with corresponding data. Can I use this library to input a text file and populate it with the necessary data?

alonrbar commented 1 year ago

Hi, no, manipulating text files is not supported. This package manipulates Word files, which are basically zipped xml files. The entire templating engine is built around manipulating xml files in a strong-typed manner, something that is significantly different than simple text files manipulation. It would be pretty hard to add support for text files and therefore it's not currently planned.