diff --git a/web/src/elements/Markdown.ts b/web/src/elements/Markdown.ts index c95d302ef..40561a59f 100644 --- a/web/src/elements/Markdown.ts +++ b/web/src/elements/Markdown.ts @@ -6,10 +6,16 @@ import AKGlobal from "../authentik.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFList from "@patternfly/patternfly/components/List/list.css"; +export interface MarkdownDocument { + html: string; + metadata: { [key: string]: string }; + filename: string; +} + @customElement("ak-markdown") export class Markdown extends LitElement { - @property() - md?: string; + @property({ attribute: false }) + md?: MarkdownDocument; static get styles(): CSSResult[] { return [PFList, PFContent, AKGlobal]; @@ -19,7 +25,8 @@ export class Markdown extends LitElement { if (!this.md) { return html``; } - const finalHTML = this.md.replace("