web/admin: rework markdown, correctly render Admonitions, fix links

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-12-19 12:48:02 +01:00
parent 39e0ed2962
commit 9d5b9204fc
6 changed files with 132 additions and 24 deletions

View File

@ -259,7 +259,20 @@ export class OAuth2ProviderViewPage extends AKElement {
class="pf-c-card pf-l-grid__item pf-m-12-col pf-m-12-col-on-xl pf-m-12-col-on-2xl"
>
<div class="pf-c-card__body">
<ak-markdown .md=${MDProviderOAuth2}></ak-markdown>
<ak-markdown
.replacers=${[
(input: string) => {
if (!this.provider) {
return input;
}
return input.replaceAll(
"&lt;application slug&gt;",
this.provider.assignedApplicationSlug,
);
},
]}
.md=${MDProviderOAuth2}
></ak-markdown>
</div>
</div>
</div>`;