|
|
@ -9,7 +9,7 @@ import Underline from '@tiptap/extension-underline' |
|
|
|
import Placeholder from '@tiptap/extension-placeholder' |
|
|
|
import Placeholder from '@tiptap/extension-placeholder' |
|
|
|
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, IsFormInj, ReadonlyInj, RowHeightInj } from '#imports' |
|
|
|
import { IsExpandedFormOpenInj, IsFormInj, IsGridInj, ReadonlyInj, RowHeightInj } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
|
value?: string | null |
|
|
|
value?: string | null |
|
|
@ -33,6 +33,8 @@ const readOnlyCell = inject(ReadonlyInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const isForm = inject(IsFormInj, ref(false)) |
|
|
|
const isForm = inject(IsFormInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isGrid = inject(IsGridInj, ref(false)) |
|
|
|
|
|
|
|
|
|
|
|
const isFocused = ref(false) |
|
|
|
const isFocused = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const turndownService = new TurndownService({}) |
|
|
|
const turndownService = new TurndownService({}) |
|
|
@ -222,6 +224,7 @@ useEventListener( |
|
|
|
'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, |
|
|
|
'nc-form-rich-text-field !p-0': isFormField, |
|
|
|
'nc-form-rich-text-field !p-0': isFormField, |
|
|
|
|
|
|
|
'nc-rich-text-grid': isGrid, |
|
|
|
}" |
|
|
|
}" |
|
|
|
:tabindex="readOnlyCell || isFormField ? -1 : 0" |
|
|
|
:tabindex="readOnlyCell || isFormField ? -1 : 0" |
|
|
|
> |
|
|
|
> |
|
|
@ -285,11 +288,12 @@ useEventListener( |
|
|
|
.ProseMirror { |
|
|
|
.ProseMirror { |
|
|
|
@apply !border-transparent max-h-full; |
|
|
|
@apply !border-transparent max-h-full; |
|
|
|
} |
|
|
|
} |
|
|
|
&:not(.nc-form-rich-text-field) { |
|
|
|
&:not(.nc-form-rich-text-field):not(.nc-rich-text-grid) { |
|
|
|
.ProseMirror { |
|
|
|
.ProseMirror { |
|
|
|
min-height: 8rem; |
|
|
|
min-height: 8rem; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&.nc-form-rich-text-field { |
|
|
|
&.nc-form-rich-text-field { |
|
|
|
.ProseMirror { |
|
|
|
.ProseMirror { |
|
|
|
padding: 0; |
|
|
|
padding: 0; |
|
|
@ -346,7 +350,7 @@ useEventListener( |
|
|
|
pointer-events: none; |
|
|
|
pointer-events: none; |
|
|
|
} |
|
|
|
} |
|
|
|
.ProseMirror { |
|
|
|
.ProseMirror { |
|
|
|
@apply flex-grow pt-1 border-1 border-gray-200 rounded-lg; |
|
|
|
@apply flex-grow pt-1.5 border-1 border-gray-200 rounded-lg; |
|
|
|
|
|
|
|
|
|
|
|
> * { |
|
|
|
> * { |
|
|
|
@apply ml-1; |
|
|
|
@apply ml-1; |
|
|
|