From 9162fdd36300d2478f13d6ad346ec2c323f40faa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 26 Jul 2021 14:12:39 +0200 Subject: Refactor video links building --- client/src/app/shared/shared-forms/markdown-textarea.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-forms/markdown-textarea.component.ts') 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 a233a4205..8f51d47df 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts @@ -6,6 +6,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' import { SafeHtml } from '@angular/platform-browser' import { MarkdownService, ScreenService } from '@app/core' +import { Video } from '@shared/models' @Component({ selector: 'my-markdown-textarea', @@ -33,7 +34,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { @Input() markdownType: 'text' | 'enhanced' = 'text' @Input() customMarkdownRenderer?: (text: string) => Promise - @Input() markdownVideo = false + @Input() markdownVideo: Video @Input() name = 'description' @@ -147,7 +148,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { } if (this.markdownVideo) { - html = this.markdownService.processVideoTimestamps(html) + html = this.markdownService.processVideoTimestamps(this.markdownVideo.shortUUID, html) } return html -- cgit v1.2.3