1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Lazy import some modules

This commit is contained in:
Chocobozzz 2019-02-15 15:52:18 +01:00
parent 17036be5bc
commit 41d713446c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 132 additions and 82 deletions

View file

@ -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) {