Change default docxtemplater parser
-
What is the best way to change default docxtemlater parser in jsreport-docxtemplater recipe? Docxtemplater provides parser parameter and it can be simply replaced with any function. Look to example https://docxtemplater.readthedocs.io/en/latest/angular_parse.html . But how to extend jsreport-docxtemplater recipe to be able to set custom parser?
-
Any ideas?
-
You can see in the code there is no way to set custom parser for now
https://github.com/jsreport/jsreport-docxtemplater/blob/master/lib/recipe.js#L29I've submitted a feature request and we will take a look at it.
Until then you can fork the repository and do the changes you need.
If you have some suggestions, please add them to the issue
https://github.com/jsreport/jsreport/issues/540
-
Thanks Jan, I haven't found the other options and forked your repository.
-
@na33ar @jan_blaha let me know if this changes. I'd like to use the angular parser as well.