Host
Web Chat
Adaptive Cards v1.2
Adaptive Cards is setting the Text Block white-space css style option to nowrap even though Text Blocks should wrap text by default according to the host config documentation. This is causing text in the card to overflow outside the Adaptive Card container. I've tried setting the Text Block wrap property in the host config to true; however, that didn't seem to have any effect.




{
"$schema": "https://microsoft.github.io/AdaptiveCards/schemas/adaptive-card.json",
"version": "1.0",
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "## Basic formatting\r\nParagraphs must be separated by a blank line. Basic formatting of *italics* and **bold** is supported."
}
]
}
@dclaux / @matthidinger FYI.
TextBlocks do not wrap by default. The wrap property has to be explicitly set to true. This is by design and has been true since the inception of AC (whether that was the right call is another story.)
Also, the documentation is wrong; TextBlockConfig doesn't exist - not in the JS renderer at least, and if it's been introduced in other renderers it's a mistake IMO.
The default size/weight/color of a TextBlock is always the "default" size, the "default" weight and the "default" color. isSubtle is always false by default, so is wrap. And maxWidth simply doesn't exist.
Most helpful comment
TextBlocks do not wrap by default. The
wrapproperty has to be explicitly set totrue. This is by design and has been true since the inception of AC (whether that was the right call is another story.)Also, the documentation is wrong; TextBlockConfig doesn't exist - not in the JS renderer at least, and if it's been introduced in other renderers it's a mistake IMO.
The default size/weight/color of a TextBlock is always the "default" size, the "default" weight and the "default" color. isSubtle is always false by default, so is wrap. And maxWidth simply doesn't exist.