-2

I'm building a website where I want to display my Freshdesk solution articles to my users with custom css styling. My API calls are successfully returning the solution articles, but the description_text property which holds the content of the articles is just a string of text (there is no html). How can I get this data formatted as an html string from the Freshdesk API? Thanks for your help.

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
hektik
  • 1
  • 1
  • 1

2 Answers2

1

Err... something like this?

const App = () => {
  return (
    <p style={/* whatever crazy style */}>
      {description_text}
    </p>
  )
};

Man it is so hard to answer when people make vague questions...

Matthew Kwong
  • 2,548
  • 2
  • 11
  • 22
  • 1
    *Man that is why we don't bother answering vauge questions and use the tools at our disposal to prompt OPs to improve their questions* – Drew Reese Nov 10 '21 at 05:37
0

I figured out the answer. You need to query the API for description, not description_text. This will return formatted html and not just plain text. Really simple!

tdy
  • 36,675
  • 19
  • 86
  • 83
hektik
  • 1
  • 1
  • 1