diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-01-07 22:08:10 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-01-07 22:08:10 +0000 |
| commit | ceb3e9770eaf466710a93c0a66daa11f2721c9df (patch) | |
| tree | d09bc6dffe57711a4a05ee276582af4d97b50f66 | |
| parent | c88d3afbda125f48fef368d4d9708409141b48ff (diff) | |
Add example of `styleMap` as a string
| -rw-r--r-- | README.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -67,6 +67,17 @@ var options = { mammoth.convertToHtml({path: "path/to/document.docx"}, options); ``` +To more easily support style mappings stored in text files, +`styleMap` can also be a string. +Each non-blank line is treated as a separate style mapping: + +```javascript +var options = { + styleMap: "p.SectionTitle => h1:fresh\n" + + "p.SubSectionTitle => h2:fresh" +}; +``` + To extend the standard style map: ```javascript |
