ic123
ic123 copied to clipboard
无法在iFrame里展示canister里的内容
看起来,目前ICP还无法支持在iframe里展示canister内部的文件,譬如一个PDF。
官方论坛的帖子有讨论过:
- Is it possible to use iFrames to embed other asset canisters?
- Integrate Internet Identity within iFrame
这个缺陷直接影响就是Chinese Deck 网页无法在 iframe
或者 object
tag里展示pdf 文件。
所以,短期内,只能先把文件放在 static/asset
文件夹里,然后通过 <anchor>
tag 来提供一个下载链接。
长远的解决办法,是用markdown直接编辑presentation slides, 用 Marp, MDX,或者Reveal.js。