mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Refactor video links building
This commit is contained in:
parent
764b1a14fc
commit
9162fdd363
22 changed files with 136 additions and 67 deletions
|
@ -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<string | HTMLElement>
|
||||
|
||||
@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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue