Skip to content
Discussion options

You must be logged in to vote

Well, does the example below help you? Basically, you can do anything and render any markup you want. So, it depends on how exactly you want to customise it, but hopefully it gives you some insight.

namespace MudBlazor;

public sealed class TestMarkdown : MudMarkdown
{
	protected override void RenderHtml(in RenderTreeBuilder builder, in StringLineGroup lines)
	{
		builder.OpenElement(ElementIndex++, "h1");
		builder.AddContent(ElementIndex++, "Custom header");
		builder.CloseElement();
	}
}

So, your sample will be rendered as an h1 element.

But well, StringLineGroup does not provide any straightforward API how to process the incoming HTML data, but you can take a look at:

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@anktsrkr
Comment options

@MihailsKuzmins
Comment options

Answer selected by MihailsKuzmins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #299 on April 22, 2025 08:47.