Google Add-on 卡片:如何将颜色应用于 header 文本
Google Add-on Card: How to apply color to header text
下面的 Google Apps 脚本指南暗示 header 文本可以着色。
当我尝试使用一些 HTML 标签(例如 <span color>
)时,它们中的任何一个都有效。
我应该使用哪个标签来实现这个?
更新
以下是我实现 header 部分的代码。 <b>
标签对有效,但我尝试应用颜色的任何尝试都失败了。
CardService.newCardBuilder()
.addSection(
CardService.newCardSection()
.setHeader('<b>header text</b>')
)
.build();
Google Apps Script Card 参考没有太多关于如何处理卡片设计的内容,但 Google 工作区 Add-ons 站点指向使用 G Suite Addon Design Kit .
关于使用 HTML 支持的标签只有少数。要评估字体颜色,请使用如下内容:
CardService.newCardBuilder()
.addSection(
CardService.newCardSection()
.setHeader('<font color="#ea9999">header text</font>')
)
.build();
参考资料
资源
下面的 Google Apps 脚本指南暗示 header 文本可以着色。
当我尝试使用一些 HTML 标签(例如 <span color>
)时,它们中的任何一个都有效。
我应该使用哪个标签来实现这个?
更新
以下是我实现 header 部分的代码。 <b>
标签对有效,但我尝试应用颜色的任何尝试都失败了。
CardService.newCardBuilder()
.addSection(
CardService.newCardSection()
.setHeader('<b>header text</b>')
)
.build();
Google Apps Script Card 参考没有太多关于如何处理卡片设计的内容,但 Google 工作区 Add-ons 站点指向使用 G Suite Addon Design Kit .
关于使用 HTML 支持的标签只有少数。要评估字体颜色,请使用如下内容:
CardService.newCardBuilder()
.addSection(
CardService.newCardSection()
.setHeader('<font color="#ea9999">header text</font>')
)
.build();
参考资料
资源