aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-08-28 19:55:24 +0100
committerMichael Williamson <mike@zwobble.org>2016-08-28 19:55:38 +0100
commitb1ae23f544c479d2b71347bbf67df7baac40d78f (patch)
tree383e694dae42ba544f690c3b0ab388a7931c0793 /README.md
parent7dba15069f9a606b9e248d7e4cd024ddaa6ac3e3 (diff)
parentc42714e5f4b643de27b106a084601e39b7e5d04c (diff)
Merge branch 'master' into image-errors
Conflicts: test/mammoth.tests.js
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2b6bac2..4f310a0 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,8 @@ The following features are currently supported:
* Text boxes. The contents of the text box are treated as a separate paragraph
that appears after the paragraph containing the text box.
+* Comments.
+
## Web demo
The easiest way to try out mammoth is to use the web demo:
@@ -295,6 +297,27 @@ var options = {
mammoth.convertToHtml({path: "path/to/document.docx"}, options);
```
+#### Comments
+
+By default, comments are ignored.
+To include comments in the generated HTML,
+add a style mapping for `comment-reference`.
+For instance:
+
+```javascript
+var mammoth = require("mammoth");
+
+var options = {
+ styleMap: [
+ "comment-reference => sup"
+ ]
+};
+mammoth.convertToHtml({path: "path/to/document.docx"}, options);
+```
+
+Comments will be appended to the end of the document,
+with links to the comments wrapped using the specified style mapping.
+
### API
#### `mammoth.convertToHtml(input, options)`