Markdown component does not render Blazor components when set through the Text attribute #1770

Closed
opened 2026-01-29 17:58:21 +00:00 by claunia · 1 comment
Owner

Originally created by @Thomas-Engelbert on GitHub (May 19, 2025).

Describe the bug
When setting the content of a Markdown component through the Text attribute, Blazor components no longer get rendered. The same problem occurs when setting the content inside the Markdown tag via a string.

This works:

<Markdown>
    <RadzenText Text="Foo" />
</Markdown>

This doesn't:

<Markdown Text=@markdown />

And neither does this:

<Markdown>
@markdown
</Markdown>

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Markdown component demo on the official Radzen website.
  2. Scroll down to the Get and set the text demo.
  3. Update the input field to contain a RadzenComponent.
  4. The component is not rendered in the panel on the right.

Expected behavior
The component should be rendered correctly.

Screenshots

Image

Removing the empty line between the component and the list messes up the rendering of the list as well.
Image

Desktop (please complete the following information):

  • OS: Win 11
  • Browser: Firefox 138.0.4 (64-bit)
  • Version: 7.0.3 (At least that's the version I used when noticing the problem locally - I have obviously no idea which version the demo page is using.)

Additional context

Originally created by @Thomas-Engelbert on GitHub (May 19, 2025). **Describe the bug** When setting the content of a Markdown component through the Text attribute, Blazor components no longer get rendered. The same problem occurs when setting the content inside the Markdown tag via a string. This works: ```html <Markdown> <RadzenText Text="Foo" /> </Markdown> ``` This doesn't: ```html <Markdown Text=@markdown /> ``` And neither does this: ```html <Markdown> @markdown </Markdown> ``` **To Reproduce** Steps to reproduce the behavior: 1. Go to the [Markdown component demo](https://blazor.radzen.com/markdown?theme=material3#text) on the official Radzen website. 1. Scroll down to the `Get and set the text` demo. 1. Update the input field to contain a RadzenComponent. 1. The component is not rendered in the panel on the right. **Expected behavior** The component should be rendered correctly. **Screenshots** ![Image](https://github.com/user-attachments/assets/645cbb02-eca2-4604-9e02-62f239cd46c4) Removing the empty line between the component and the list messes up the rendering of the list as well. ![Image](https://github.com/user-attachments/assets/fadd4bae-9490-4324-b8d2-230069f990c1) **Desktop (please complete the following information):** - OS: Win 11 - Browser: Firefox 138.0.4 (64-bit) - Version: 7.0.3 (At least that's the version I used when noticing the problem locally - I have obviously no idea which version the demo page is using.) **Additional context** -
Author
Owner

@akorchev commented on GitHub (May 20, 2025):

Yes, this is not a supported feature as something needs to parse the Blazor component. You can use components only via setting the child content as shown in the online demo.

@akorchev commented on GitHub (May 20, 2025): Yes, this is not a supported feature as something needs to parse the Blazor component. You can use components only via setting the child content as shown in the online demo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1770