Home > Software design >  How to Export HTML to Word Document with React js
How to Export HTML to Word Document with React js

Time:12-29

Hello I have HTML data in my React App and want to export this in word document and download at button click event. can any one help to make this one please.

          let element = (
            <p  style={{fontSize: "10px", color:"#000"}}>
              Your investment in the maintenance package is just , billed directly to your credit card.
            </p>
           )

Need function to export this in workd document

CodePudding user response:

By clicking this button, the exportHTML() JavaScript function will be called. The HTML portion to be exported into a word document will be identified with the ID selector. The content of the DIV element specified with the id source-html is used to build the source of the HTML export in the JavaScript function.

CodePudding user response:

By clicking this button, the exportHTML() JavaScript function will be called. The HTML portion to be exported into a word document will be identified with the ID selector. The content of the DIV element specified with the id source-html is used to build the source of the HTML export in the JavaScript function.

  • Related