Im trying to send large descriptions inside a card using the google hangout api; but unfortunately the text is being trimmed when its too long. Below is a sample of the card I send:
"cards": [{
"sections": [{
"widgets": [{
"keyValue": {
"topLabel": "Label",
"content": "Long Description goes here..."
}
}
]
}
]
}
]
When I look at the html received by the bot the content is in a dive with white-space: nowrap;
...
I tried placing the content in a div and giving it white-space: wrap;
as such
"content": "<div style='white-space: wrap;'>Long Description...</div>"
, but the bot just removes that div when it sends the card.
I also noticed that on pc browser the text was trimmed at 43 characters, so I used regex to add \n at every 43 character using .replace(/.{42}/g, '$&\n')
, which kind of works but on mobile the card seems to trim messages even more...
Anyway I could simply remove that annoying white-space
style??
EDIT
I know about this post, but it tries to increase width of the card (which technically would work for me), and there were no solutions...