guigrpa / docx-templates

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

How to add a color logic based on a value in the placeholder #364

Open uri-cynomi opened 5 months ago

uri-cynomi commented 5 months ago

if I have a placeholder like {{score}} inside the template I would like the text to be green if the score value is bigger than 5, otherwise red

SuchiraD commented 4 months ago

I have achieved this by inline IF conditions

image