Language

HtmlWidgetHelpers.BuildHtmlWidgetMarkdown Method

Definition

Wraps an HTML widget payload in the ```html-widget markdown code fence format required by Teams to render the widget in a message.

public static string BuildHtmlWidgetMarkdown(Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetPayload payload, Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetMarkdownOptions? options = default);
static member BuildHtmlWidgetMarkdown : Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetPayload * Microsoft.Teams.Apps.HtmlWidget.HtmlWidgetMarkdownOptions -> string
Public Shared Function BuildHtmlWidgetMarkdown (payload As HtmlWidgetPayload, Optional options As HtmlWidgetMarkdownOptions = Nothing) As String

Parameters

payload
HtmlWidgetPayload

The widget payload to serialize.

options
HtmlWidgetMarkdownOptions

Optional text to include before/after the widget block.

Returns

The markdown string containing the widget code block.

Applies to