0

I'm starting a project where I need to do the following:

  1. On a web interface, user chooses from a list of text elements (survey questions) stored in a database.
  2. User can rearrange the order of questions using drag and drop. User can also edit survey question text in the browser.
  3. User exports the survey to a Word document.

I'm building this app with the React on Rails framework.

But I'm looking for libraries where I can easily export a react view to a Word document. The only one I think might work is redocx, but this library doesn't seem very robust. Any other ideas or libraries for converting React components to Word docs?

  • You may look at https://jsreport.net there is a recipe to generate a docx file. Not sure if that answers your question as it doesn't really convert the react component, but lets you create a copy of it (using the data from the database) on the platform. – Shmili Breuer Jun 23 '20 at 15:56
  • I would probably take another route. I would pull all of the data from React to Rails (together with the order), and use something like https://github.com/ruby-docx/docx in order to generate DOCX on the backend side. – mutantkeyboard Jun 24 '20 at 09:11

0 Answers0