网站首页 网站源码
@using Markdig
@((MarkupString)_htmlContent)
@code {
[Parameter]public string Content { get; set; }
private string _htmlContent = "";
protected override async Task OnInitializedAsync()
{
var pipeline = new MarkdownPipelineBuilder().DisableHtml().Build();
_htmlContent = Markdown.ToHtml(Content,pipeline);
await base.OnInitializedAsync();
}
}