X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-forms%2Fmarkdown-textarea.component.ts;h=e3371f22c7592b594f58f9e7551758020fe8a12d;hb=0e45e336f62a411b3c423be46d16252355c754d7;hp=dcb5d20daca791d0fd1beef0dff22e0621edab92;hpb=8d8a037e3fe9b1d2ccbc4169ce59b13000b59cb0;p=github%2FChocobozzz%2FPeerTube.git 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 dcb5d20da..e3371f22c 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts @@ -24,10 +24,7 @@ import { Video } from '@shared/models' export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { @Input() content = '' - @Input() classes: string[] | { [klass: string]: any[] | any } = [] - - @Input() textareaMaxWidth = '100%' - @Input() textareaHeight = '150px' + @Input() formError: string @Input() truncate: number @@ -93,6 +90,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { } onMaximizeClick () { + if (this.disabled) return + this.isMaximized = !this.isMaximized // Make sure textarea have the focus @@ -145,9 +144,9 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { html = result } else if (this.markdownType === 'text') { - html = await this.markdownService.textMarkdownToHTML(text) + html = await this.markdownService.textMarkdownToHTML({ markdown: text }) } else { - html = await this.markdownService.enhancedMarkdownToHTML(text) + html = await this.markdownService.enhancedMarkdownToHTML({ markdown: text }) } if (this.markdownVideo) {