-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法在iFrame里展示canister里的内容 #39
Comments
用了个hack暂时解决了这个问题。从安全的角度,ICP对iframe的使用做了一些限制: 所以,ICP上的iframe,不能直接展示canister内部的文件。但是,ICP上的iframe,可以展示ICP网络外部文件(譬如一个Youtube的视频)。所以,可以用以下方式绕过ICP目前的限制:
详情可见 #43 的使用情况。 |
可以试下之前 PR#35 的方法,在本地网络部署是可以的: 需要统一把pdf等静态文件放在static目录下,然后在docusaurus配置文件中设置静态资源的索引目录,添加static,这样 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看起来,目前ICP还无法支持在iframe里展示canister内部的文件,譬如一个PDF。
官方论坛的帖子有讨论过:
这个缺陷直接影响就是Chinese Deck 网页无法在
iframe
或者object
tag里展示pdf 文件。所以,短期内,只能先把文件放在
static/asset
文件夹里,然后通过<anchor>
tag 来提供一个下载链接。长远的解决办法,是用markdown直接编辑presentation slides, 用 Marp, MDX,或者Reveal.js。
The text was updated successfully, but these errors were encountered: