]> Untitled Git - lemmy-ui.git/commitdiff
Increase markdown field char limit to 50k. Fixes #849 (#850)
authorDessalines <dessalines@users.noreply.github.com>
Sat, 12 Nov 2022 17:06:41 +0000 (12:06 -0500)
committerGitHub <noreply@github.com>
Sat, 12 Nov 2022 17:06:41 +0000 (12:06 -0500)
src/shared/components/common/markdown-textarea.tsx
src/shared/utils.ts

index 8cdfaadc33b0dafd82aee0241ee037681b3bf9f1..d58520fe7182612e1148cb55095786dc1ad7377b 100644 (file)
@@ -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 &&
index 473993b20adbab18b8be704da0aaac5b26f0d2cb..6494a7d9ea17c98b4049830a999149349d126d9d 100644 (file)
@@ -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";