diff --git a/packages/nc-gui/components/cell/RichText.vue b/packages/nc-gui/components/cell/RichText.vue index 866b422fe7..fdaa5e9a0a 100644 --- a/packages/nc-gui/components/cell/RichText.vue +++ b/packages/nc-gui/components/cell/RichText.vue @@ -12,6 +12,7 @@ import { Link } from '@/helpers/dbTiptapExtensions/links' const props = defineProps<{ value?: string | null readonly?: boolean + syncValueChange?: boolean }>() const emits = defineEmits(['update:value']) @@ -54,6 +55,12 @@ const setEditorContent = (contentMd: any) => { editor.value.chain().setContent(content).setTextSelection(selection.to).run() } +if (props.syncValueChange) { + watch(vModel, () => { + setEditorContent(vModel.value) + }) +} + onMounted(() => { setTimeout(() => { setEditorContent(vModel.value) @@ -65,11 +72,22 @@ onMounted(() => {
- +