feat: respect current server's char limit

This commit is contained in:
Daniel Roe 2022-11-25 14:01:28 +00:00
parent b8ce2fc62b
commit f7dff673ad
No known key found for this signature in database
GPG key ID: 22D5008E4F5D9B55
4 changed files with 11 additions and 8 deletions

View file

@ -10,7 +10,6 @@ import { Plugin } from 'prosemirror-state'
import type { Ref } from 'vue'
import { HashSuggestion, MentionSuggestion } from './tiptap/suggestion'
import { POST_CHARS_LIMIT } from '~/constants'
export interface UseTiptapOptions {
content: Ref<string | undefined>
@ -44,7 +43,7 @@ export function useTiptap(options: UseTiptapOptions) {
placeholder,
}),
CharacterCount.configure({
limit: POST_CHARS_LIMIT,
limit: characterLimit.value,
}),
CodeBlock,
Extension.create({