diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-22 12:03:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-22 12:03:30 +0100 |
| commit | 796bce72195a448fc752668a7e16555acf0d7700 (patch) | |
| tree | f902981dd4c240eb898cefc9c059a17f7f073401 /lib/docx/document-xml-reader.js | |
| parent | 0326c56e24f7333381c7ef8c17aba0ac8380c02b (diff) | |
Add styleName property to Run
Diffstat (limited to 'lib/docx/document-xml-reader.js')
| -rw-r--r-- | lib/docx/document-xml-reader.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/docx/document-xml-reader.js b/lib/docx/document-xml-reader.js index da95a36..462cd61 100644 --- a/lib/docx/document-xml-reader.js +++ b/lib/docx/document-xml-reader.js @@ -108,7 +108,12 @@ function DocumentXmlReader(options) { var styleElement = element.first("w:rStyle"); if (styleElement) { - properties.styleId = styleElement.attributes["w:val"]; + var styleId = styleElement.attributes["w:val"]; + properties.styleId = styleId; + if (styleId) { + var style = styles.findCharacterStyleById(styleId); + properties.styleName = style.name; + } } properties.isBold = !!element.first("w:b"); properties.isItalic = !!element.first("w:i"); |
