fix(nc-gui): limit the number of blocks to render in rich text cell

This commit is contained in:
Ramesh Mane
2025-01-08 06:53:47 +00:00
parent e6b8fde7cb
commit 8d1027361d
4 changed files with 112 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { marked } from 'marked'
import type { AIRecordType } from 'nocodb-sdk'
import { NcMarkdownParser } from '../../helpers/tiptap/markdown'
const props = defineProps<{
modelValue?: string | number
@@ -159,9 +160,8 @@ const isRichMode = computed(() => {
const richTextContent = computed(() => {
if (isRichMode.value && vModel.value) {
return marked.parse(vModel.value)
return NcMarkdownParser.parse(vModel.value, { maxBlockTokens: 10 }, true)
}
return ''
})