Added auto links and media support to markdown
This commit is contained in:
parent
ca1a5998c4
commit
736f261459
|
@ -1,4 +1,5 @@
|
||||||
using Markdig;
|
using Markdig;
|
||||||
|
using Markdig.Extensions.MediaLinks;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Wave.Data;
|
using Wave.Data;
|
||||||
|
|
||||||
|
@ -12,6 +13,11 @@ public static class MarkdownUtilities {
|
||||||
.UseListExtras()
|
.UseListExtras()
|
||||||
.UseSoftlineBreakAsHardlineBreak()
|
.UseSoftlineBreakAsHardlineBreak()
|
||||||
.UseSmartyPants()
|
.UseSmartyPants()
|
||||||
|
.UseAutoLinks()
|
||||||
|
.UseMediaLinks(new MediaOptions {
|
||||||
|
AddControlsProperty = true,
|
||||||
|
Class = "max-w-full"
|
||||||
|
})
|
||||||
.DisableHtml()
|
.DisableHtml()
|
||||||
.Build();
|
.Build();
|
||||||
return Markdown.ToHtml(markdown, pipeline);
|
return Markdown.ToHtml(markdown, pipeline);
|
||||||
|
|
Loading…
Reference in a new issue