我正在尝试使用this用于对某些 Google 文档运行迭代的 API。然而,我对 Javascript 的经验很少。我将如何替换关键字,例如 <"image">
,带有来自 URL 的实际内嵌图像? ChildIndex 支持段落内的索引吗?代码奖励积分!
最佳答案
如果您想从 URL 添加实际的内嵌图像,请尝试以下操作:
var img_name_Url = "URL of the image";
var img_name_Blob = UrlFetchApp.fetch(img_name).getBlob().setName("img_name_Blob");
在您想要使用它的文档中:
htmlBody : "The content for the inline image <img src='cid:img_name'>",
inlineImages:
{
img: img_name_Blob
}
关于javascript - 用图像替换文本 Google 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19170968/