|
|
@ -8,7 +8,7 @@ import { generateJSON } from '@tiptap/html' |
|
|
|
import Underline from '@tiptap/extension-underline' |
|
|
|
import Underline from '@tiptap/extension-underline' |
|
|
|
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item' |
|
|
|
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item' |
|
|
|
import { Link } from '@/helpers/dbTiptapExtensions/links' |
|
|
|
import { Link } from '@/helpers/dbTiptapExtensions/links' |
|
|
|
import { IsExpandedFormOpenInj, RowHeightInj } from '#imports' |
|
|
|
import { IsExpandedFormOpenInj, RowHeightInj, ReadonlyInj } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
|
value?: string | null |
|
|
|
value?: string | null |
|
|
@ -24,6 +24,8 @@ const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))! |
|
|
|
|
|
|
|
|
|
|
|
const rowHeight = inject(RowHeightInj, ref(1 as const)) |
|
|
|
const rowHeight = inject(RowHeightInj, ref(1 as const)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const readOnlyCell = inject(ReadonlyInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const turndownService = new TurndownService({}) |
|
|
|
const turndownService = new TurndownService({}) |
|
|
|
|
|
|
|
|
|
|
|
turndownService.addRule('lineBreak', { |
|
|
|
turndownService.addRule('lineBreak', { |
|
|
@ -174,7 +176,7 @@ watch(editorDom, () => { |
|
|
|
'nc-rich-text-embed flex flex-col pl-1 w-full': !fullMode, |
|
|
|
'nc-rich-text-embed flex flex-col pl-1 w-full': !fullMode, |
|
|
|
'readonly': readOnly, |
|
|
|
'readonly': readOnly, |
|
|
|
}" |
|
|
|
}" |
|
|
|
tabindex="0" |
|
|
|
:tabindex="readOnlyCell ? -1 : 0" |
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="showMenu && !readOnly" |
|
|
|
v-if="showMenu && !readOnly" |
|
|
@ -191,6 +193,7 @@ watch(editorDom, () => { |
|
|
|
<CellRichTextLinkOptions v-if="editor" :editor="editor" /> |
|
|
|
<CellRichTextLinkOptions v-if="editor" :editor="editor" /> |
|
|
|
<EditorContent |
|
|
|
<EditorContent |
|
|
|
ref="editorDom" |
|
|
|
ref="editorDom" |
|
|
|
|
|
|
|
:disabled="readOnly" |
|
|
|
:editor="editor" |
|
|
|
:editor="editor" |
|
|
|
class="flex flex-col nc-textarea-rich-editor w-full" |
|
|
|
class="flex flex-col nc-textarea-rich-editor w-full" |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|