View the output of your .docx LIVE in your browser while you are coding it using docx.js.
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.
- Node.js v14.18.0 or higher
- Start by cloning the repository:
git clone git@github.com:naskio/docx-viewer.git
- Install dependencies:
yarn install
- Run forward port script:
yarn forward_port
- Create
.env
file :cp .env.example .env
- Add the url generated by
yarn forward_port
to your.env
file (varPUBLIC_URL
). - Run the server:
yarn start
- Open the Docx viewer at
http://localhost:3000
- Start editing the document
./docx-src/source.js
- Start editing the document
- 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
- You can find the generated document at
Don't hesitate to open an issue or to submit a pull request if you have any questions or suggestions.