diff options
Diffstat (limited to 'client')
3 files changed, 5 insertions, 3 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html index 5339240bb..3d8414f5c 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | <my-markdown-textarea | 18 | <my-markdown-textarea |
19 | name="instanceCustomHomepageContent" formControlName="content" | 19 | name="instanceCustomHomepageContent" formControlName="content" |
20 | [customMarkdownRenderer]="getCustomMarkdownRenderer()" | 20 | [customMarkdownRenderer]="getCustomMarkdownRenderer()" [debounceTime]="500" |
21 | [formError]="formErrors['instanceCustomHomepage.content']" | 21 | [formError]="formErrors['instanceCustomHomepage.content']" |
22 | ></my-markdown-textarea> | 22 | ></my-markdown-textarea> |
23 | 23 | ||
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html index b54733327..504afa189 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | <my-markdown-textarea | 39 | <my-markdown-textarea |
40 | name="instanceDescription" formControlName="description" | 40 | name="instanceDescription" formControlName="description" |
41 | [customMarkdownRenderer]="getCustomMarkdownRenderer()" | 41 | [customMarkdownRenderer]="getCustomMarkdownRenderer()" [debounceTime]="500" |
42 | [formError]="formErrors['instance.description']" | 42 | [formError]="formErrors['instance.description']" |
43 | ></my-markdown-textarea> | 43 | ></my-markdown-textarea> |
44 | </div> | 44 | </div> |
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 e3371f22c..c6527e169 100644 --- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts +++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts | |||
@@ -31,6 +31,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
31 | @Input() markdownType: 'text' | 'enhanced' = 'text' | 31 | @Input() markdownType: 'text' | 'enhanced' = 'text' |
32 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> | 32 | @Input() customMarkdownRenderer?: (text: string) => Promise<string | HTMLElement> |
33 | 33 | ||
34 | @Input() debounceTime = 150 | ||
35 | |||
34 | @Input() markdownVideo: Video | 36 | @Input() markdownVideo: Video |
35 | 37 | ||
36 | @Input() name = 'description' | 38 | @Input() name = 'description' |
@@ -59,7 +61,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit { | |||
59 | ngOnInit () { | 61 | ngOnInit () { |
60 | this.contentChanged | 62 | this.contentChanged |
61 | .pipe( | 63 | .pipe( |
62 | debounceTime(150), | 64 | debounceTime(this.debounceTime), |
63 | distinctUntilChanged() | 65 | distinctUntilChanged() |
64 | ) | 66 | ) |
65 | .subscribe(() => this.updatePreviews()) | 67 | .subscribe(() => this.updatePreviews()) |