mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Add hyperlink video timestamps in description
Fix #1312 (duplicates: #1728 and #2007) The modification is also applied to comments and video editing.
This commit is contained in:
parent
a0dedc02ca
commit
d68ebf0b4a
5 changed files with 24 additions and 10 deletions
|
@ -27,6 +27,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
|
|||
@Input() previewColumn = false
|
||||
@Input() truncate: number
|
||||
@Input() markdownType: 'text' | 'enhanced' = 'text'
|
||||
@Input() markdownVideo = false
|
||||
|
||||
textareaMarginRight = '0'
|
||||
flexDirection = 'column'
|
||||
|
@ -89,9 +90,11 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
|
|||
this.previewHTML = await this.markdownRender(this.content)
|
||||
}
|
||||
|
||||
private markdownRender (text: string) {
|
||||
if (this.markdownType === 'text') return this.markdownService.textMarkdownToHTML(text)
|
||||
private async markdownRender (text: string) {
|
||||
const html = this.markdownType === 'text' ?
|
||||
await this.markdownService.textMarkdownToHTML(text) :
|
||||
await this.markdownService.enhancedMarkdownToHTML(text)
|
||||
|
||||
return this.markdownService.enhancedMarkdownToHTML(text)
|
||||
return this.markdownVideo ? this.markdownService.processVideoTimestamps(html) : html
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue