From 0f214c2ddbcc70cb8d0a6037dea5d4466dea0cde Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 18 Jan 2024 17:27:13 -0500 Subject: [PATCH] Make a separate post markdown field character limit. Context: https://github.com/LemmyNet/lemmy/issues/3262 --- src/shared/components/post/post-form.tsx | 2 ++ src/shared/config.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/components/post/post-form.tsx b/src/shared/components/post/post-form.tsx index 3e69976d8..90bd57efa 100644 --- a/src/shared/components/post/post-form.tsx +++ b/src/shared/components/post/post-form.tsx @@ -23,6 +23,7 @@ import { import { archiveTodayUrl, ghostArchiveUrl, + postMarkdownFieldCharacterLimit, relTags, trendingFetchLimit, webArchiveUrl, @@ -477,6 +478,7 @@ export class PostForm extends Component { allLanguages={this.props.allLanguages} siteLanguages={this.props.siteLanguages} hideNavigationWarnings + maxLength={postMarkdownFieldCharacterLimit} /> diff --git a/src/shared/config.ts b/src/shared/config.ts index 70019742a..690395328 100644 --- a/src/shared/config.ts +++ b/src/shared/config.ts @@ -19,7 +19,8 @@ export const postRefetchSeconds: number = 60 * 1000; export const trendingFetchLimit = 6; export const mentionDropdownFetchLimit = 10; export const commentTreeMaxDepth = 8; -export const markdownFieldCharacterLimit = 50000; +export const postMarkdownFieldCharacterLimit = 50000; +export const markdownFieldCharacterLimit = 10000; export const maxUploadImages = 20; export const concurrentImageUpload = 4; export const updateUnreadCountsInterval = 30000;