Skip to content

Markdown not rendering in cards #2062

@tdurnford

Description

@tdurnford

Screenshots

imgpsh_mobile_save

Describe the bug

The markdown renderer is not being passed to the createAdaptiveCardsAttachmentMiddleware function as a parameter, so Web Chat is throwing a warning that the markdown render for attachments is undefined and all markdown in cards is being ignored.

To Reproduce

Send a card such as a hero card with markdown to Web Chat.

const heroCard = CardFactory.heroCard(
    '[BotFramework Hero Card](https://microsoft.com)',
    CardFactory.images(['http://localhost:3978/dog.jpg']),
    CardFactory.actions([
        {
            type: 'openUrl',
            title: 'openUrl',
            value: 'https://azure.microsoft.com/en-us/pricing/details/bot-service/'
        },{
            type: 'postBack',
            title: 'postBack',
            value: 'postBack'
        },{
            type: 'imBack',
            title: 'imBack',
            value: 'imBack'
        }])
);

await context.sendActivity({ attachments: [heroCard] });

Expected Result

image

Actual Result

image

[Bug]

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or an unintended behavior.front-burnersupportInternal request for assistance from the Support Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions