Hello,
Is it possible to properly format a rich text field that is being populated by a connector with html elements to display the rich text elements without displaying the html elements?
My cards are currently displaying the html elements on the cards (for example
,<a href=>), and the rich text elements are not showing up properly as rich text.
Thank you!
Hi @Carolyn_Gorick ,
In the Adding Rich Text unit , you’ll find some helpful instructions to modify your Handlebars template to allow the HTML to render correctly. In short, you’ll want to ensure the details
field of your card is surrounded by triple braces {{{ }}}
.
If you’re using a standard card, you may need to fork the card to add this.
Let me know if this works and if you have any more questions.
Hi Melissa,
My card is already set up to have triple braces around the details, but it still has the issue showing rich text and html elements.
Thank you,
Carolyn
Had a similar issue and I added this code from the above article to my details section (replacing profile.answer with my rich text custom field)
details: profile.answer ? ANSWERS.formatRichText(profile.answer, “answer”, linkTarget) : null,
and it worked! Dropping this post here in case anyone else needs help with this.
1 Like
Hello! With a different client, I am having the same issue but the above fixes are not working.
The Rich Text field in my KG), powered by a WP connector, is populating normally (no html characters), but on the card itself in answers, some html is still showing (screenshot attached).
I made sure the {{{}}} on details was there and I was using the richtext formatter, but the issue is still appearing. The Rich Text Description Field on my entities show normal text, but for some reason when it’s referenced on the card it comes through with some HTML. I also added several transforms in the connector to remove the HTML characters, including the “-” that keeps showing up in Answers.
This is using:
details: profile.c_description ? profile.c_description : null,
And this is what happens if I use the rich text formatter, for either custom field c_description or c_richTextDescription (both fields in KG):
details: profile.c_description ? ANSWERS.formatRichText(profile.c_description, “answer”, linkTarget) : null,
Any suggestions for what might be going wrong?
Hi Sunny, since this is a client issue someone will be able to reach out to you internally. cc @Alex_Yang