Reputation: 789
Using Handlebar/Mustache, I would like to show the Address as follows (with the new lines):
{{FirstName}}{{LastName}}
{{Address1}}{{Address2}}
{{City}}
{{State}}
{{Zip}}
But the above is always rendered in one line. I tried using \n but it doesn't work. Is it possible to handle new line (\n) in the template?
Upvotes: 2
Views: 6445
Reputation: 2210
Add HTML line breaks to your template:
{{FirstName}}{{LastName}}<br/>
{{Address1}}{{Address2}}<br/>
{{City}}<br/>
{{State}}<br/>
{{Zip}}
Upvotes: 4