How to render doc to html converted data(html) into webpage

28 Views Asked by At

Scenario:

I have one largest (50MB - size) file and converted that into html file using third party tool.

Now I wish to showcase converted HTML file into my webpage

When trying this scenario my React page gets stuck/hang for some minutes and render actual html

Want to render my entire html based on view port/ Virtualized manner as like react-window

1

There are 1 best solutions below

0
mssp On

I think what you are looking for is to parse html to jsx, and from there you can create your window with the styling you want. One library I suggest using is https://www.npmjs.com/package/html-react-parser.

The parser is async so I think your app won't hang and it will render way faster