pptxtojson 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/rollup.config.js +5 -0
- package/src/fill.js +4 -2
package/index.html
CHANGED
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
100
|
<div class="link">
|
|
101
|
-
<a target="_blank" href="https://github.com/pipipi-pikachu/pptx2json">Github仓库</a>
|
|
102
|
-
<a target="_blank" href="https://pipipi-pikachu.github.io/PPTist/"
|
|
101
|
+
<a target="_blank" href="https://github.com/pipipi-pikachu/pptx2json">Github 仓库</a>
|
|
102
|
+
<a target="_blank" href="https://pipipi-pikachu.github.io/PPTist/">在 PPTist 中测试</a>
|
|
103
103
|
</div>
|
|
104
104
|
</div>
|
|
105
105
|
<div id="jsoneditor"></div>
|
package/package.json
CHANGED
package/rollup.config.js
CHANGED
package/src/fill.js
CHANGED
|
@@ -33,8 +33,10 @@ export function getFillType(node) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export async function getPicFill(type, node, warpObj) {
|
|
36
|
+
if (!node) return ''
|
|
37
|
+
|
|
36
38
|
let img
|
|
37
|
-
const rId = node['a:blip'
|
|
39
|
+
const rId = getTextByPathList(node, ['a:blip', 'attrs', 'r:embed'])
|
|
38
40
|
let imgPath
|
|
39
41
|
if (type === 'slideBg' || type === 'slide') {
|
|
40
42
|
imgPath = getTextByPathList(warpObj, ['slideResObj', rId, 'target'])
|
|
@@ -58,7 +60,7 @@ export async function getPicFill(type, node, warpObj) {
|
|
|
58
60
|
imgPath = escapeHtml(imgPath)
|
|
59
61
|
|
|
60
62
|
const imgExt = imgPath.split('.').pop()
|
|
61
|
-
if (imgExt === 'xml') return
|
|
63
|
+
if (imgExt === 'xml') return ''
|
|
62
64
|
|
|
63
65
|
const imgArrayBuffer = await warpObj['zip'].file(imgPath).async('arraybuffer')
|
|
64
66
|
const imgMimeType = getMimeType(imgExt)
|