添加 tinymce API 输入 google 应用程序脚本
Add tinymce API Key in google app scripts
我一直在尝试在 Google App Scripts 项目中添加 TinyMCE。为此,我从 TinyMCE 获得了一个 API 密钥,并将域 http://script.google.com 添加到该密钥的域列表中。
然后添加 API 键以使用下面的代码 -
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=API"></script>
但是当我试图调用该项目 HTML 文件中的 TinyMCE 时,我收到一条错误消息 -
The domain is not supported by your API key. Please review your domain settings here.
Snapshot of the error on the page for TinyMCE when page is loaded
快速 console.log(window.location)
表明主机名是别的东西。在我的例子中是 n-4fcnzkskmuesjcsczo67y2qkpk3vxmg4aionr6i-0lu-script.googleusercontent.com
您的主机名可能不同,因为我认为任何数量的 google 服务器都可以为您的页面提供服务。
因此请尝试将 googleusercontent.com 添加到您在 TinyMCE 中的 API 设置中。
我认为这个问题与 tinymce 有关,而不是 Apps 脚本。尝试this tinymce forum中提供的答案,遇到同样的错误。
If you tried to use your API key before you added these other domains
the key is likely cached on our servers. The TTL is 4 hours so it may
just take some time for the other domains to be valid.
We will be enhancing the domain registration/addition process to flush
the cache when you make changes in an upcoming release of our cloud
environment.
我一直在尝试在 Google App Scripts 项目中添加 TinyMCE。为此,我从 TinyMCE 获得了一个 API 密钥,并将域 http://script.google.com 添加到该密钥的域列表中。
然后添加 API 键以使用下面的代码 -
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=API"></script>
但是当我试图调用该项目 HTML 文件中的 TinyMCE 时,我收到一条错误消息 -
The domain is not supported by your API key. Please review your domain settings here.
Snapshot of the error on the page for TinyMCE when page is loaded
快速 console.log(window.location)
表明主机名是别的东西。在我的例子中是 n-4fcnzkskmuesjcsczo67y2qkpk3vxmg4aionr6i-0lu-script.googleusercontent.com
您的主机名可能不同,因为我认为任何数量的 google 服务器都可以为您的页面提供服务。
因此请尝试将 googleusercontent.com 添加到您在 TinyMCE 中的 API 设置中。
我认为这个问题与 tinymce 有关,而不是 Apps 脚本。尝试this tinymce forum中提供的答案,遇到同样的错误。
If you tried to use your API key before you added these other domains the key is likely cached on our servers. The TTL is 4 hours so it may just take some time for the other domains to be valid.
We will be enhancing the domain registration/addition process to flush the cache when you make changes in an upcoming release of our cloud environment.