show first entry

This commit is contained in:
u80864958
2025-04-10 16:17:58 +02:00
commit fb2d784421
46 changed files with 15997 additions and 0 deletions

View File

@ -0,0 +1,22 @@
import { Component, Input, OnChanges, OnInit } from '@angular/core';
import DOMPurify from 'dompurify';
import { marked } from 'marked';
@Component({
selector: 'app-markdown',
imports: [],
standalone: true,
templateUrl: './markdown.component.html',
})
export class MarkdownComponent implements OnChanges {
@Input() markdown: string = '';
innerHTML: string = '';
async parseMD() {
this.innerHTML = DOMPurify.sanitize(await marked.parse(this.markdown));
}
ngOnChanges(): void {
this.parseMD();
}
}