4,374 questions
Render an react component on a word document
Suchismita Dhal
0
Reputation points
My goal is to create a Word Add-in utilizing Yeoman and React, where I intend to display a React component on the Word document. I attempted to achieve this by defining a React element and inserting it into the Word document using the insertHtml
function.
let block = <CustomComponent/>
const element = context.document.body.insertHtml(renderToString(block), 'End');
However, this method did not keep the JavaScript and CSS of the component. How can I accomplish this?
Microsoft 365 and Office Development Other
Microsoft 365 and Office Word For business Windows
1,935 questions
Sign in to answer