X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fforms%2Fmarkdown-textarea.component.ts;h=49a57f29debd6b4ee148be8c3e1bb7ed89cd6eac;hb=8dfceec44a5eec8b0190d1d5076aab0f03a0cb52;hp=e87aca0d4b402d9fb0c0e8ba2c35a6a97c5cea78;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/forms/markdown-textarea.component.ts b/client/src/app/shared/forms/markdown-textarea.component.ts index e87aca0d4..49a57f29d 100644 --- a/client/src/app/shared/forms/markdown-textarea.component.ts +++ b/client/src/app/shared/forms/markdown-textarea.component.ts @@ -82,11 +82,11 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { return this.screenService.isInSmallView() === false } - private updatePreviews () { + private async updatePreviews () { if (this.content === null || this.content === undefined) return - this.truncatedPreviewHTML = this.markdownRender(truncate(this.content, { length: this.truncate })) - this.previewHTML = this.markdownRender(this.content) + this.truncatedPreviewHTML = await this.markdownRender(truncate(this.content, { length: this.truncate })) + this.previewHTML = await this.markdownRender(this.content) } private markdownRender (text: string) {