diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-03-23 11:59:01 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-03-23 11:59:01 +0000 |
| commit | 54d10f8d06c18917b97c67d245d1559134f5e2d8 (patch) | |
| tree | 2718445b44b6626ceded04cc05c68a3694a20f1d | |
| parent | eca70c03ccfb8576039d61184649ed4858b1bd3d (diff) | |
Add notes on browser usage
| -rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -61,6 +61,18 @@ Where `custom-style-map` looks something like: ### Library +In node.js, mammoth can be required in the usual way: + +```javascript +var mammoth = require("mammoth"); +``` + +To generate a standalone JavaScript file for the browser, +use `mammoth.browser.js` (generate using `make setup` if it is not already present). +This uses any loaded module system. +If no module system is found, +`mammoth` is set as a window global. + #### Basic conversion To convert an existing .docx file to HTML, use `mammoth.convertToHtml`: |
