diff --git a/front/components/Field/MarkdownInputField.vue b/front/components/Field/MarkdownInputField.vue index 6fd52c3..8bb6621 100644 --- a/front/components/Field/MarkdownInputField.vue +++ b/front/components/Field/MarkdownInputField.vue @@ -3,11 +3,11 @@ diff --git a/front/components/Home/Text/TextUploadInputTextView.vue b/front/components/Home/Text/TextUploadInputTextView.vue index 7dc0f0a..8bf3d5d 100644 --- a/front/components/Home/Text/TextUploadInputTextView.vue +++ b/front/components/Home/Text/TextUploadInputTextView.vue @@ -1,74 +1,72 @@ diff --git a/front/components/Tiptap.vue b/front/components/Tiptap/Index.vue similarity index 65% rename from front/components/Tiptap.vue rename to front/components/Tiptap/Index.vue index 56442f5..5e01987 100644 --- a/front/components/Tiptap.vue +++ b/front/components/Tiptap/Index.vue @@ -3,9 +3,12 @@ import { Editor, EditorContent } from '@tiptap/vue-3' import StarterKit from '@tiptap/starter-kit' import { Markdown } from 'tiptap-markdown' import Placeholder from '@tiptap/extension-placeholder' +import { cx } from 'class-variance-authority' + const props = defineProps<{ modelValue?: string placeholder?: string + class?: string }>() const emit = defineEmits<{ (e: 'update:modelValue', value: string): void @@ -27,14 +30,14 @@ onMounted(() => { // CommandsPlugin, ], onUpdate: () => { - emit('update:modelValue', editor.value?.storage?.markdown?.getMarkdown() ?? '') + emit('update:modelValue', (editor.value as any)?.storage?.markdown?.getMarkdown() ?? '') }, }) }) watch( () => props.modelValue, (value) => { - if (value !== editor.value?.storage?.markdown?.getMarkdown()) { + if (value !== (editor.value as any)?.storage?.markdown?.getMarkdown()) { editor.value?.commands.setContent(value ?? '') } } @@ -45,7 +48,13 @@ onUnmounted(() => {