From 9379dfab0f18875685b2d98fbb7e9b79fd7d3fe2 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 23 Nov 2023 11:20:35 +0000 Subject: [PATCH] fix: Fixed rich cell value sync when rich modal is open and show scrollbar in rich cell only when on hover --- packages/nc-gui/components/cell/RichText.vue | 20 +++++++++++++++++++- packages/nc-gui/components/cell/TextArea.vue | 13 ++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) 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(() => {
- +