Closed luisherranz closed 7 years ago
Or we can use this library: https://github.com/aknuds1/html-to-react
The desired component should look like something like this:
const Paragraph = ({ children, ...rest }) => <p ...rest>{children}</p>;
const Image = ({ children, ...rest }) => <img ...rest>{children}</p>;
<HtmltoReact html={html} p={Paragraph} img={Image} />
And should use normal Html tags if a component is not assigned.
👏👏👏
It looks like it is not working properly with the content from https://www.adslzone.tv/
For example: https://github.com/andrejewski/himalaya