From cb38c9b9eaaf20abdb739553d7a3f1e1add8c604 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 Feb 2023 14:37:13 +0100 Subject: Fix broadcast message inconsistency with preview --- client/src/app/shared/shared-forms/markdown-textarea.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts index c6527e169..7e2d3e4f4 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts @@ -28,7 +28,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { @Input() truncate: number - @Input() markdownType: 'text' | 'enhanced' = 'text' + @Input() markdownType: 'text' | 'enhanced' | 'to-unsafe-html' = 'text' @Input() customMarkdownRenderer?: (text: string) => Promise @Input() debounceTime = 150 @@ -147,8 +147,10 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { html = result } else if (this.markdownType === 'text') { html = await this.markdownService.textMarkdownToHTML({ markdown: text }) - } else { + } else if (this.markdownType === 'enhanced') { html = await this.markdownService.enhancedMarkdownToHTML({ markdown: text }) + } else if (this.markdownType === 'to-unsafe-html') { + html = await this.markdownService.markdownToUnsafeHTML({ markdown: text }) } if (this.markdownVideo) { -- cgit v1.2.3