Style is not implementing

47 Views Asked by At

I am working with react-pdf/renderer, and I have data structured like this:

<h2><strong>This is a test <em>account</em>.</strong> thank you for your</h2>
support and patience. This is a test account. thank you. This is a test account. thank you.<br />for your support and patience.<br />
<ol>
  <li>This is a test account. <strong><em>thank you for your support</em></strong> and</li>
  <li>patience for your support and patience</li>
</ol>

if i use ReactHtmlParser they remove html tags and styles as well. only formatting is applied.

My objective is to remove HTML tags and apply styles according to the HTML tags provided by the API. For example, if a tag is included in the API data, I want to remove the tag and apply the associated style. The same applies to ol, ul, and li tags.

0

There are 0 best solutions below