diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:43:02 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:43:02 +0100 |
| commit | 62e6d800f0dd5b649ed094c3879e57a9c50dab8a (patch) | |
| tree | c36176d5e77b868e44091de23b779123ea5b9c9e | |
| parent | a52d99fd85061a9f20b481535407a225d5927434 (diff) | |
Document strikethrough support
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | README.md | 28 |
2 files changed, 30 insertions, 0 deletions
@@ -2,6 +2,8 @@ * Add support for underlines in style map. +* Add support for strikethrough. + # 0.3.21 * Add basic support for text boxes. The contents of the text box are treated as @@ -233,6 +233,23 @@ var options = { }; ``` +### Strikethrough + +By default, strikethrough text is wrapped in `<s>` tags. +This behaviour can be changed by adding a style mapping for `strike`. +For instance, to wrap strikethrough text in `<del>` tags: + +```javascript +var mammoth = require("mammoth"); + +var options = { + styleMap: [ + "strike => del" + ] +}; +mammoth.convertToHtml({path: "path/to/document.docx"}, options); +``` + #### Document transforms Mammoth allows a document to be transformed before it is converted. @@ -486,6 +503,17 @@ u Note that this matches text that has had underline explicitly applied to it. It will not match any text that is underlined because of its paragraph or run style. +#### Strikethough + +Match explicitly struckthrough text: + +``` +strike +``` + +Note that this matches text that has had strikethrough explicitly applied to it. +It will not match any text that is struckthrough because of its paragraph or run style. + ### HTML paths #### Single elements |
