Handlebars and patcher functions #2683
akiross
started this conversation in
Ideas / Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, lately I've been using docx and it has been very helpful, so thank you!
Since I'm mostly doing templating with it, I was wondering how complex the template language can get. I saw handlebars is mentioned, but I don't see that being used in the code, so all the powerful template language is not available. Would be possible to use that as a template mechanism?
As alternative, I think being able to use a function instead of a string would also be very powerful. So, instead of having a patcher like
having a function instead of a map could provide great flexibility:
In my case, I have many values in a context and I would like to replace them whenever they appear in the document, possibly combining the values. Having a function would allow me to pick the values and combine them on the fly, even using a mini-language like
What do you think?
Thanks again for docx!
Beta Was this translation helpful? Give feedback.
All reactions