Member Junction
    Preparing search index...
    • Convert Markdown text from an agent response to a Microsoft Teams Adaptive Card.

      Teams TextBlock elements support a subset of Markdown natively, so most formatting is passed through directly. Code blocks use the Monospace font type.

      Parameters

      • markdown: string

        Raw Markdown text from an agent response.

      Returns Record<string, unknown>

      Adaptive Card JSON object ready to attach to a Teams message.

      const card = markdownToAdaptiveCard('# Hello\n\nThis is **bold** text.');
      // {
      // type: 'AdaptiveCard',
      // version: '1.4',
      // body: [
      // { type: 'TextBlock', text: 'Hello', size: 'Large', weight: 'Bolder', wrap: true },
      // { type: 'TextBlock', text: 'This is **bold** text.', wrap: true }
      // ]
      // }