0

I have this content

 content: "<h2 style="text-align:center;"><strong>Medicines</strong></h2>↵<p><span style="font-size: 16px;">This is regarding the medicines</span></p>"

I want to display it in the html form.

Karan Patokar
  • 465
  • 1
  • 8
  • 21
  • possible duplicate of https://stackoverflow.com/questions/39758136/render-html-string-as-real-html-in-a-react-component – gogaz Oct 10 '18 at 11:21

1 Answers1

0

You must use dangerouslySetInnerHTML
<div dangerouslySetInnerHTML={{ __html: content }} />