Skip to content

Live Preview the generated word document (docx) in your browser while using https://docx.js.org/

License

Notifications You must be signed in to change notification settings

naskio/docx-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docx-viewer

docx-viewer icon

View the output of your .docx LIVE in your browser while you are coding it using docx.js.

Getting started

Description

Working with docx.js can be painful without viewing the output of your code in real-time. I created this project to help you work with docx.js in order to code word documents easily. It offers a viewer for your .docx file, and a live preview of your code in real-time.

how it works

Requirements

  • Node.js v14.18.0 or higher

Getting Started

  1. Start by cloning the repository: git clone [email protected]:naskio/docx-viewer.git
  2. Install dependencies: yarn install
  3. Run forward port script: yarn forward_port
  4. Create .env file : cp .env.example .env
  5. Add the url generated by yarn forward_port to your .env file (var PUBLIC_URL).
  6. Run the server: yarn start
  7. Open the Docx viewer at http://localhost:3000
    • Start editing the document ./docx-src/source.js
  8. Save the file ./docx-src/source.js and see the changes live in your browser.
    • You can find the generated document at ./docx-src/output.docx

Contributing

Don't hesitate to open an issue or to submit a pull request if you have any questions or suggestions.