diff --git a/src/frontend/src/content/docs/fundamentals/external-parameters.mdx b/src/frontend/src/content/docs/fundamentals/external-parameters.mdx index 0aa4ab76..8b2a0373 100644 --- a/src/frontend/src/content/docs/fundamentals/external-parameters.mdx +++ b/src/frontend/src/content/docs/fundamentals/external-parameters.mdx @@ -134,7 +134,7 @@ When you select **Enter values**, Aspire displays a form that you can use to con You can also control how the dashboard displays these parameters, by using these methods: - `WithDescription`: Use this method to provide a text description that helps users understand the purpose of the parameter. To provide a formatted description in [Markdown](https://www.markdownguide.org/basic-syntax/), use the `enableMarkdown: true` parameter. -- `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. +- `WithCustomInput`: Use this method to provide a callback method that customizes the parameter dialog. For example, in this callback you can customize the default value, input type, label, and placeholder text. When using `WithCustomInput`, you must copy the `EnableDescriptionMarkdown` property from the parameter to the `InteractionInput` object to preserve markdown rendering. This code shows how to set a description and use the callback: @@ -143,14 +143,15 @@ var builder = DistributedApplication.CreateBuilder(args); #pragma warning disable ASPIREINTERACTION001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. var externalServiceUrl = builder.AddParameter("external-service-url") - .WithDescription("The URL of the external service.") + .WithDescription("The URL of the external service. See [example.com](https://example.com) for details.", enableMarkdown: true) .WithCustomInput(p => new() { InputType = InputType.Text, Value = "https://example.com", Name = p.Name, Placeholder = $"Enter value for {p.Name}", - Description = p.Description + Description = p.Description, + EnableDescriptionMarkdown = p.EnableDescriptionMarkdown }); var externalService = builder.AddExternalService("external-service", externalServiceUrl); #pragma warning restore ASPIREINTERACTION001 @@ -165,6 +166,10 @@ The code renders this control in the dashboard: alt="Screenshot of the Aspire dashboard parameter completion dialog with customizations." /> + +