我想在lambda函数内容中超链接一个特定的文本。我试过这样做,但不起作用。
if (intentName == "greetings") {
var message = {
'contentType': 'PlainText',
'content': '<a href="www.google.com">click here</a>'
}
responseMsg = close( sessionAttributes, 'Fulfilled', message );
}
我知道我们可以超链接响应卡,但我想超链接内容中的特定文本。你知道怎么做吗?或者有其他选择吗?我使用的是javascript。
编辑1:我可以通过附件进行编辑:
function close(sessionAttributes,fulfillmentState,message){
return{
sessionAttributes,
dialogAction: {
type: 'Close',
fulfillmentState,
message,
"responseCard": {
"contentType": "application/vnd.amazonaws.card.generic",
"genericAttachments": [
{
'title': 'Google',
'attachmentLinkUrl': 'https://www.google.com',
}
]
}
}
};
}
https://stackoverflow.com/questions/48860542
复制相似问题