mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 导出PPTX备注错误(#319)
This commit is contained in:
parent
fa2b17bb64
commit
824a38682e
@ -424,7 +424,16 @@ export default () => {
|
|||||||
pptxSlide.background = { color: c.color, transparency: (1 - c.alpha) * 100 }
|
pptxSlide.background = { color: c.color, transparency: (1 - c.alpha) * 100 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (slide.remark) pptxSlide.addNotes(slide.remark)
|
if (slide.remark) {
|
||||||
|
const doc = new DOMParser().parseFromString(slide.remark, 'text/html')
|
||||||
|
const pList = doc.body.querySelectorAll('p')
|
||||||
|
const text = []
|
||||||
|
for (const p of pList) {
|
||||||
|
const textContent = p.textContent
|
||||||
|
text.push(textContent || '')
|
||||||
|
}
|
||||||
|
pptxSlide.addNotes(text.join('\n'))
|
||||||
|
}
|
||||||
|
|
||||||
if (!slide.elements) continue
|
if (!slide.elements) continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user