Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
6a056bbe
Verified
Commit
6a056bbe
authored
Jan 13, 2023
by
Chocobozzz
Browse files
Increase textarea debounce time for custom markup
parent
eba2a7a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
View file @
6a056bbe
...
...
@@ -17,7 +17,7 @@
<my-markdown-textarea
name=
"instanceCustomHomepageContent"
formControlName=
"content"
[customMarkdownRenderer]=
"getCustomMarkdownRenderer()"
[customMarkdownRenderer]=
"getCustomMarkdownRenderer()"
[debounceTime]=
"500"
[formError]=
"formErrors['instanceCustomHomepage.content']"
></my-markdown-textarea>
...
...
client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
View file @
6a056bbe
...
...
@@ -38,7 +38,7 @@
<my-markdown-textarea
name=
"instanceDescription"
formControlName=
"description"
[customMarkdownRenderer]=
"getCustomMarkdownRenderer()"
[customMarkdownRenderer]=
"getCustomMarkdownRenderer()"
[debounceTime]=
"500"
[formError]=
"formErrors['instance.description']"
></my-markdown-textarea>
</div>
...
...
client/src/app/shared/shared-forms/markdown-textarea.component.ts
View file @
6a056bbe
...
...
@@ -31,6 +31,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
@
Input
()
markdownType
:
'
text
'
|
'
enhanced
'
=
'
text
'
@
Input
()
customMarkdownRenderer
?:
(
text
:
string
)
=>
Promise
<
string
|
HTMLElement
>
@
Input
()
debounceTime
=
150
@
Input
()
markdownVideo
:
Video
@
Input
()
name
=
'
description
'
...
...
@@ -59,7 +61,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
ngOnInit
()
{
this
.
contentChanged
.
pipe
(
debounceTime
(
150
),
debounceTime
(
this
.
debounceTime
),
distinctUntilChanged
()
)
.
subscribe
(()
=>
this
.
updatePreviews
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment