-
Notifications
You must be signed in to change notification settings - Fork 13
Update guide
ミシャ edited this page Sep 13, 2021
·
5 revisions
In WebAssembly
builder.Services.AddMudMarkdownServices();
In Server
services.AddMudMarkdownServices();
Property H*Typo
has been replaced with OverrideHeaderTypo
.
<MudMarkdown OverrideHeaderTypo="HandleHeaderTypo" />
@code
{
private static Typo HandleHeaderTypo(Typo originalTypo) =>
originalTypo switch
{
Typo.h1 or Typo.h2 => Typo.h3,
Typo.h3 => Typo.h4,
_ => originalTypo
}
}
Add a JavaScript file reference to Pages/_Host.cstml
(Server) or wwwroot/index.html
(WebAssembly) at the end of the <body>
element.
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="_content/MudBlazor.Markdown/MudBlazor.Markdown.min.js"></script> <!-- Add this line -->