diff options
author | Chocobozzz <me@florianbigard.com> | 2023-02-13 14:37:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-02-13 14:37:13 +0100 |
commit | cb38c9b9eaaf20abdb739553d7a3f1e1add8c604 (patch) | |
tree | 965ceaaa8a72046c6d98046dc88d4938b1450d5e /client/src/app/shared | |
parent | 57d64f30e30b57ba5dc035fcaf38895d775412bd (diff) | |
download | PeerTube-cb38c9b9eaaf20abdb739553d7a3f1e1add8c604.tar.gz PeerTube-cb38c9b9eaaf20abdb739553d7a3f1e1add8c604.tar.zst PeerTube-cb38c9b9eaaf20abdb739553d7a3f1e1add8c604.zip |
Fix broadcast message inconsistency with preview
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/shared-forms/markdown-textarea.component.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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 { | |||
28 | 28 | ||
29 | @Input() truncate: number | 29 | @Input() truncate: number |
30 | 30 | ||
31 | @Input() markdownType: 'text' | 'enhanced' = 'text' | 31 | @Input() markdownType: 'text' | 'enhanced' | 'to-unsafe-html' = 'text' |
32 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> | 32 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> |
33 | 33 | ||
34 | @Input() debounceTime = 150 | 34 | @Input() debounceTime = 150 |
@@ -147,8 +147,10 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
147 | html = result | 147 | html = result |
148 | } else if (this.markdownType === 'text') { | 148 | } else if (this.markdownType === 'text') { |
149 | html = await this.markdownService.textMarkdownToHTML({ markdown: text }) | 149 | html = await this.markdownService.textMarkdownToHTML({ markdown: text }) |
150 | } else { | 150 | } else if (this.markdownType === 'enhanced') { |
151 | html = await this.markdownService.enhancedMarkdownToHTML({ markdown: text }) | 151 | html = await this.markdownService.enhancedMarkdownToHTML({ markdown: text }) |
152 | } else if (this.markdownType === 'to-unsafe-html') { | ||
153 | html = await this.markdownService.markdownToUnsafeHTML({ markdown: text }) | ||
152 | } | 154 | } |
153 | 155 | ||
154 | if (this.markdownVideo) { | 156 | if (this.markdownVideo) { |