Skip to content

hongxiyu/docxjs

 
 

Repository files navigation

npm version

docxjs

Docx rendering library

Demo - http://zVolodymyr.github.io/docxjs

Usage

<!--optional polyfill for promise-->
<script src="https://unpkg.com/promise-polyfill/dist/polyfill.min.js"></script>
<!--lib uses jszip-->
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="docx-preview.min.js"></script>
<script>
    var docData = <document Blob>;

    docx.renderAsync(docData, document.getElementById("container"))
        .then(x => console.log("docx: finished"));
</script>
<body>
    ...
    <div id="container"></div>
    ...
</body>

Status and stability

So far I can't come up with final approach of parsing documents and final structure of API. Main development is moved to next branch. Only renderAsync function is stable and definition shouldn't be changed in future. Inner implementation of parsing and rendering may be changed at any point of time.

About

Docx rendering library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.5%
  • HTML 44.9%
  • JavaScript 1.6%