1.0.2 • Published 2 years ago
pzpmammoth v1.0.2
核心方法(将word文档转换为HTML) mammoth.convertToHtml
:
var mammoth = require("mammoth");
mammoth.convertToHtml({path: "path/to/document.docx"})
.then(function(result){
var html = result.value;
var messages = result.messages;
})
.catch(function(error) {
console.error(error);
});