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