From: Dessalines Date: Sat, 12 Nov 2022 17:06:41 +0000 (-0500) Subject: Increase markdown field char limit to 50k. Fixes #849 (#850) X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7B%60%24%7BghostArchiveUrl%7D/%7BimageSrc%7D?a=commitdiff_plain;h=ee0cdde3b89af0341d6d3d659a9ae9598d6b5f49;p=lemmy-ui.git Increase markdown field char limit to 50k. Fixes #849 (#850) --- diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 8cdfaad..d58520f 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -8,6 +8,7 @@ import { i18n } from "../../i18next"; import { UserService } from "../../services"; import { isBrowser, + markdownFieldCharacterLimit, markdownHelpUrl, mdToHtml, pictrsDeleteToast, @@ -143,7 +144,9 @@ export class MarkdownTextArea extends Component< required disabled={this.props.disabled} rows={2} - maxLength={this.props.maxLength.unwrapOr(10000)} + maxLength={this.props.maxLength.unwrapOr( + markdownFieldCharacterLimit + )} placeholder={toUndefined(this.props.placeholder)} /> {this.state.previewMode && diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 473993b..6494a7d 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -74,6 +74,7 @@ export const fetchLimit = 40; export const trendingFetchLimit = 6; export const mentionDropdownFetchLimit = 10; export const commentTreeMaxDepth = 8; +export const markdownFieldCharacterLimit = 50000; export const relTags = "noopener nofollow";