diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-12-06 15:44:56 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-12-06 15:44:56 +0000 |
| commit | af8b26e0e157fe41673094622dc0988ddc3e70d5 (patch) | |
| tree | 3ec4bddf55d02f26956445934135fa9f522cb8ae /lib | |
| parent | 9878af20ba8c637853308323dab3e06c8ebbfed4 (diff) | |
Read v:imagedata with r:id attribute
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/docx/body-reader.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index d6a20b0..618474e 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -188,7 +188,8 @@ function BodyReader(options) { "v:textbox": readChildElements, "w:txbxContent": readChildElements, "wp:inline": readDrawingElement, - "wp:anchor": readDrawingElement + "wp:anchor": readDrawingElement, + "v:imagedata": readImageData }; return { readXmlElement: readXmlElement, @@ -236,6 +237,12 @@ function BodyReader(options) { } } + function readImageData(element) { + return readImage( + findEmbeddedImageFile(element.attributes["r:id"]), + element.attributes["o:title"]); + } + function findEmbeddedImageFile(relationshipId) { var path = joinZipPath("word", relationships[relationshipId].target); return { |
