An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
April 10, 2022 01:05 pm GMT
Original Link: https://dev.to/agiksetiawan/render-html-tag-in-next-js-or-react-js-3cfe
Render HTML tag in Next JS or React JS
If we use WYSIWYG Editor in our content usually it will be save as HTML in Database.
render HTML tag in React / Next JS very simply with 'dangerouslySetInnerHTML'
Example:
const content = `<b>Test Content</b>`;<p dangerouslySetInnerHTML={{ __html: content }}></p>
Original Link: https://dev.to/agiksetiawan/render-html-tag-in-next-js-or-react-js-3cfe
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To