Re: data.descriptionHtml formatting on buybutton

Solved

data.descriptionHtml formatting on buybutton

IcePick1985
Visitor
2 1 0

Hey Guys!

 

I'm using the buy button to inject a button into my wordpress instance. I wanted to use the Description of the Product in my wordpress as well, that's why I switched on "description" as well and used the "templates" to output it the way I want it:

 

"templates": {
	'title': '<p><strong>{{data.title}}</strong></p>',
	'description': '{{data.descriptionHtml}}'
	},

The Catch: it always displays the HTML as text:

IcePick1985_0-1668278795525.png

 

When I use "data.description" though, it does not respect the line breaks etc.

 

Any idea how I can teach it to output "data.descriptionHtml" as HTML, not as text?

Thanks!

Florian

 

Accepted Solution (1)

IcePick1985
Visitor
2 1 0

This is an accepted solution.

Got it!

Simply put three "{" before and after the description:

{{{data.descriptionHtml}}}

View solution in original post

Reply 1 (1)

IcePick1985
Visitor
2 1 0

This is an accepted solution.

Got it!

Simply put three "{" before and after the description:

{{{data.descriptionHtml}}}