【发布时间】:2020-02-24 21:32:49
【问题描述】:
我需要能够使用 Google 应用脚本将超链接和换行符插入到我的 Google 表单的帮助文本中。两者都不可能。
对于我尝试过的链接(无效):
http://link.com/path-
<a href='http://link.com/path'>http://link.com/path</a>
对于我尝试过的换行符(无效):
\n\\n\n
我的代码如下:
function createForm() {
var form = FormApp.create('Amazon Open Source Project Classification');
form.setDescription("This form is for labeling open source projects using the project url and description with the following 4 categories:\n\n1) \
API - this is an API library that can only be used to access an Amazon Web Services (AWS) API\n2) EDUCATION - this is an educational project or example \
of how to use an AWS API\n3) GENERAL - this is a general purpose open source project with utility for the public\n4) DATASET - this is a dataset \
published by researchers as part of their researchz\n")
form.addMultipleChoiceItem()
.setTitle("What category does the project fall under?")
.setHelpText("<a href='http://github.com/alexa/alexa-skills-kit-sdk-for-nodejs'>http://github.com/alexa/alexa-skills-kit-sdk-for-nodejs</a>\n\nThe Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.")
.setChoiceValues(['API','EDUCATION', 'GENERAL', 'DATASET'])
Logger.log('Published URL: ' + form.getPublishedUrl());
Logger.log('Editor URL: ' + form.getEditUrl());
}
【问题讨论】:
-
手动可以吗?
标签: google-apps-script hyperlink newline google-apps google-forms