You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to render a card which contains a RichTextBlock with two TextRun with the JavaScript SDK :
Is a simple text TextRun
Is a clickable TextRunwith OpenUrlAction as selectAction
Everything is fine while creating my RichTextBlock : when I watch the .toJSON() result I can see my selectAction.
After using AdaptiveCards.addItem and watch the .toJSON() of my AdaptiveCards I don't see the selectAction anymore.
Microsoft Teams is rendering my card but there is not OpenUrlAction on the second TextRun.
It seems like the method .addItem remove selectAction from my TextRun.
Maybe I am not using well the JavaScript SDK ?
Screenshots
RichTextBlock content before .addItem :
Card after adding RichTextBlock with .addItem
Card JSON
Not needed, the card is rendered.
Sample Code Language
TypeScript
Sample Code
constcard=newAdaptiveCard();constrichTextBlock=newRichTextBlock();consttextRun1=newTextRun('first text sample');textRun1.weight=TextWeight.Bolder;consttextRun2=newTextRun('second url text sample');textRun2.weight=TextWeight.Bolder;textRun2.color=TextColor.Accent;constopenUrlAction=newOpenUrlAction();openUrlAction.url="http://sampleurl.com";textRun2.selectAction=openUrlAction;richTextBlock.addInline(textRun1);richTextBlock.addInline(textRun2);card.addItem(richTextBlock);
The text was updated successfully, but these errors were encountered:
Target Platforms
NodeJS
SDK Version
1.3.2
Application Name
Microsoft Teams
Problem Description
Hello,
I am trying to render a card which contains a RichTextBlock with two TextRun with the JavaScript SDK :
Everything is fine while creating my RichTextBlock : when I watch the .toJSON() result I can see my selectAction.
After using AdaptiveCards.addItem and watch the .toJSON() of my AdaptiveCards I don't see the selectAction anymore.
Microsoft Teams is rendering my card but there is not OpenUrlAction on the second TextRun.
It seems like the method .addItem remove selectAction from my TextRun.
Maybe I am not using well the JavaScript SDK ?
Screenshots
RichTextBlock content before .addItem :
Card after adding RichTextBlock with .addItem
Card JSON
Not needed, the card is rendered.
Sample Code Language
TypeScript
Sample Code
The text was updated successfully, but these errors were encountered: