guigrpa / docx-templates

Template-based docx report creation
MIT License
882 stars 145 forks source link

Ability to preprocess XML by developers #352

Open ronram5126 opened 7 months ago

ronram5126 commented 7 months ago

Hi, Its a simple couple of lines of readable non-invasive update, that allows developers to pass their function to pre-process the xml.

It is optional but provides developer tools to handle minor changes. I'm using it in production to process rich text data.

It also allows user to extract xml data if its needed for something else. I'm thinking that I will try to see if I can make mamoth take this xml and convert it to HTML for display purposes.

This feature might not work with worker but it will not cause any problem with normal execution.

I haven't written any docs for now. Please let me know if you are interested. I will write docs and examples if you think this is a good, else totally understand if you don't want to merge it.

PS. great work.