I am using quick replies template and would like to use different font size and color for text, how this can be used.
For example text = “line1” + “\nline2”
I want line1 to be displayed in bigger font compared to line 2 and then line2 in color red.
Below is java script that I am using:
var quickReplies = [“button1”,“button2”,“button3”];
var replyValues = [“button1”,“button2”,“button3”]; ;
var message = {
“type”: “template”,
“payload”: {
“template_type”: “quick_replies”,
“text”: “This is first line. \nThis is second line”,
“quick_replies”: []
}
};
for (i = 0; i < quickReplies.length; i++) {
//if only text needs to diplayed
var quickReply = {
“content_type”: “text”,
“title”: quickReplies[i],
“payload”: replyValues[i]
};
/* Uncomment this if both text and image needs to displayed for the quick reply button
var quickReply = {
“content_type”:“text”,
“title”:quickReplies[i],
“payload”:“payload2”,
“image_url”: "url of the image
};
*/
message.payload.quick_replies.push(quickReply);
}
print(JSON.stringify(message));