在WordPress页面中嵌入Google Apps Script WebApp [英] Embedding Google Apps Script WebApp in WordPress Page

查看:160
本文介绍了在WordPress页面中嵌入Google Apps Script WebApp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经对如何解决Wordpress的iframe限制做了大量的研究,并且我已经能够使用各种常用服务插件(谷歌地图,YouTube等)进行工作。但是,所有这些方法都不适用于嵌入我已发布的WebApp之一。我最近的努力一直在使用这个插件

I've done a great deal of research on how to workaround Wordpress's iframe restrictions and I've been able to get it to work using various plugins with common services (google maps, youtube, etc.). However, all of these methods have not worked for embedding one of my published webApps. My most recent efforts have been using this plugin.

这是一个非常简单的'Hello World'webApp,我想嵌入: LINK

Here is an extremely simple 'Hello World' webApp that I would like to embed: LINK.

我无法简单地将该URL用作iframe的'src',因此我将webApp嵌入这个谷歌网站,然后查看我发现的iframe的来源:

I was unable to simply use that URL as the 'src' for the iframe so I embedded the webApp in this google site then viewed the source of that iframe which I found to be:

<iframe src="https://sites.google.com/macros/s/AKfycbyAFo9aWOUw3FxiVZTGad6sgpcIbxZm1g9dS0yujV0tOBAI3582/exec?authuser=0&amp;mid=ACjPJvEpRFnQA1LHa7qtEGta-zgj2r8oi_E2l-BUfSFUNBlxmagk2TXEd6msYIW1i7b4lfPTkEc9dZLm795dplLiaH7LZ3GchmiVtMYyXnBeeGhQ-NfS8a7-2n7NKzqPFibZ1fqr&amp;bc=transparent&amp;f=Georgia,+Times+New+Roman,+serif&amp;tc=%23333333&amp;lc=%230036b3" title="Apps Script Gadget" width="150" height="100" frameborder="0" scrolling="no" id="maestro_frame_1429669030"></iframe>

然后,我在wordpress页面的插件短代码内使用了iframe代码,发布时没有显示任何代码。框架似乎在那里,但它是完全空白的。当我尝试查看帧源时 - 它是空白的。请帮忙?

I then used that iframe code within the plugin's shortcode on the wordpress page and nothing is shown when published. The frame seems to be there but it's completely blank. When I try to view the frame source - it's blank. Please help?

我可以通过其他方式来执行此操作。我只需要以某种方式嵌入我的已发布的GAS webApps。

I'm open to other ways to do this. I just need to somehow embed my published GAS webApps.

推荐答案

为了节省其他人对此答案的挖掘, code> setXFrameOptionsMode :

To save others digging for this answer, it is possible by using setXFrameOptionsMode:

https://developers.google.com/apps-script/reference/html/html-output#setxframeoptionsmodemode

这篇关于在WordPress页面中嵌入Google Apps Script WebApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆