skip to Main Content

How to parse html from some special html tag?

I create a test html string and try to render it in React, but my solution is not working. Try the solution1: const textHtml = '<p>Test</p><p><strong>Test</strong></p><p><em>Test</em></p>'; return ( <div> <div dangerouslySetInnerHTML={{ __html: textHtml }} /> </div> ); Try the solution…

VIEW QUESTION
Back To Top
Search