I am using django as backend and react as frontend, I am using tinymce to create description in django-admin page , But react is displaying description content with html tags
Ouput:
<p>Best Cough Syrup</p>
I used dangerouslySetInnerHTML but page is not loading any content
<div dangerouslySetInnerHTML={product.description} />
Is there any way to solve this issue
CodePudding user response:
Try this:
{
<div
dangerouslySetInnerHTML={{__html:product.description}}
>
</div>
}