我需要控制我的网站中嵌入的 Google 文档查看器。更具体地说,我需要能够启用/禁用 Google 幻灯片视图的控件,并能够使用 JavaScript 启动/停止演示文稿。
我无法找到任何 JavaScript API,也无法添加我的主机,以便我的 JavaScript 能够与iframe
内容。
有人做过这样的事吗?
Google 文档根本不是这样工作的。以下是您需要采取的步骤。
1: Create Presentation on Google Slides.
1a: https://docs.google.com/presentation/u/0/
2: Create any scripts you want applied in the script editor.
2a: https://developers.google.com/apps-script/guides/slides/
3: Publish Presentation.
3a: File>Publish to Web>Embed
4: Embed Presentation.
5: Create HTML Function call
6: Create Listener w/ Google Docs (Not on your site.)
如果您希望您的网站能够访问并运行来自 google 的脚本(也称为禁用控件。)请参阅下面的此链接,它将向您展示如何使用 HTML 请求从 google 文档运行脚本。请记住,使用 google 的免费帐户的每日函数调用是有限制的。我相信每天最多 5500 个电话。
HTML 函数调用:https://developers.google.com/apps-script/guides/html/communication https://developers.google.com/apps-script/guides/html/communication
您还提到了 iFrame,您可以在此处找到有关 iFrame 的信息。
iFrame 沙盒:https://developers.google.com/apps-script/migration/iframe https://developers.google.com/apps-script/migration/iframe
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)