diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:50 +0200 |
commit | 9162fdd36300d2478f13d6ad346ec2c323f40faa (patch) | |
tree | dea0ca43f3ea2fb72a73ca77338f5b7c990acdd7 /client/src/app/shared/shared-forms/markdown-textarea.component.ts | |
parent | 764b1a14fc494f2cfd7ea590d2f07b01df65c7ad (diff) | |
download | PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.gz PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.zst PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.zip |
Refactor video links building
Diffstat (limited to 'client/src/app/shared/shared-forms/markdown-textarea.component.ts')
-rw-r--r-- | client/src/app/shared/shared-forms/markdown-textarea.component.ts | 5 |
1 files changed, 3 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 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 | |||
6 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' | 6 | import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' |
7 | import { SafeHtml } from '@angular/platform-browser' | 7 | import { SafeHtml } from '@angular/platform-browser' |
8 | import { MarkdownService, ScreenService } from '@app/core' | 8 | import { MarkdownService, ScreenService } from '@app/core' |
9 | import { Video } from '@shared/models' | ||
9 | 10 | ||
10 | @Component({ | 11 | @Component({ |
11 | selector: 'my-markdown-textarea', | 12 | selector: 'my-markdown-textarea', |
@@ -33,7 +34,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
33 | @Input() markdownType: 'text' | 'enhanced' = 'text' | 34 | @Input() markdownType: 'text' | 'enhanced' = 'text' |
34 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> | 35 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> |
35 | 36 | ||
36 | @Input() markdownVideo = false | 37 | @Input() markdownVideo: Video |
37 | 38 | ||
38 | @Input() name = 'description' | 39 | @Input() name = 'description' |
39 | 40 | ||
@@ -147,7 +148,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
147 | } | 148 | } |
148 | 149 | ||
149 | if (this.markdownVideo) { | 150 | if (this.markdownVideo) { |
150 | html = this.markdownService.processVideoTimestamps(html) | 151 | html = this.markdownService.processVideoTimestamps(this.markdownVideo.shortUUID, html) |
151 | } | 152 | } |
152 | 153 | ||
153 | return html | 154 | return html |