You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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