diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-05-06 13:41:20 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-05-06 13:41:20 +0100 |
| commit | 4ef34968c720c58c419ee18f0897645049175d7c (patch) | |
| tree | 88001251a8af6c5f92673a9d64af5742adb9c774 /lib | |
| parent | b28c1b2fb503e6bd2120c9c665084eb1bbecef32 (diff) | |
Add mammoth.convertToHtml
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js index 097e9ce..8496c4c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,6 +5,7 @@ var documentMatchers = require("./document-matchers"); var style = require("./style-reader").readStyle; exports.Converter = Converter; +exports.convertToHtml = convertToHtml; exports.read = read; exports.convertDocumentToHtml = convertDocumentToHtml; exports.htmlPaths = htmlPaths; @@ -39,6 +40,11 @@ Converter.prototype.convertToHtml = function(inputOptions) { }); } +function convertToHtml(input, options) { + var converter = new Converter(options); + return converter.convertToHtml(input); +} + function read(inputOptions) { return docxReader.read(inputOptions); } |
