Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1 KB

README.md

File metadata and controls

30 lines (26 loc) · 1 KB

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.