google-apps-script - 在 Google 脚本中将 HTML 转换为纯文本
问题描述
我在 gmail 上收到 HTML 格式的电子邮件,我想用 google 脚本解析正文的文本,我尝试了下面的代码,但 GS 不想调试它。
var temp = document.createElement("div");
temp.innerHTML = html;
return temp.textContent || temp.innerText || "";
在这种情况下,我不知道如何使用 GetText。提前致谢!
解决方案
推荐阅读
- android - 毕加索显示 colorPrimary 而不是图像
- google-cloud-platform - 如何检查正在运行的 Google Cloud Run 容器的实例数?
- python - 需要删除while循环
- python - Pandas:如果与列表内容匹配,则返回列值的更快方法?
- scapy - scapy "Ether()" 没有 "chksum" 参数
- mysql - 如何使用 ReactJS、Node.js 和 MySQL 查询将数据从表单数据发送到数据库?
- c# - C# 8 预览中的抽象接口方法
- php - PHP:括号交互的preg_replace问题')'
- javascript - 在没有 require() 输出的情况下,无法使用 webpack 和 Babel 为 Web 创建缩小的 JavaScript 库
- jhipster - 无法将网关或微服务连接到 JHipster Registry。Jhipster v5.8.2