Skip to content

Instantly share code, notes, and snippets.

@enricopolanski
Created November 28, 2017 00:22
Show Gist options
  • Save enricopolanski/3e7759ee4faa771858bf7c7db65e920f to your computer and use it in GitHub Desktop.
Save enricopolanski/3e7759ee4faa771858bf7c7db65e920f to your computer and use it in GitHub Desktop.
var mammoth = require("mammoth");
mammoth.convertToHtml({path: "path/to/document.docx"})
.then(function(result){
var html = result.value; // The generated HTML
var messages = result.messages; // Any messages, such as warnings during conversion
})
.done();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment