From b13d814ed620c87d26497f1d177d8f1c46bb38e6 Mon Sep 17 00:00:00 2001 From: Seth Sharp Date: Sat, 3 Feb 2024 19:41:31 +1000 Subject: [PATCH] wip --- package-lock.json | 5 +++ package.json | 5 +++ .../js/Components/Blogs/CreateEditForm.vue | 5 ++- resources/js/Components/Editor/BubbleMenu.vue | 2 +- .../js/Components/Editor/ComponentMenu.vue | 34 +++++++++++++++++++ resources/js/Components/Editor/Editor.vue | 24 ++++++++++--- 6 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 resources/js/Components/Editor/ComponentMenu.vue diff --git a/package-lock.json b/package-lock.json index 44ca2d8c..75e69ca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,11 @@ "@headlessui/vue": "^1.7.16", "@heroicons/vue": "^2.0.18", "@tiptap/extension-bubble-menu": "^2.2.1", + "@tiptap/extension-document": "^2.2.1", + "@tiptap/extension-list-item": "^2.2.1", + "@tiptap/extension-ordered-list": "^2.2.1", + "@tiptap/extension-paragraph": "^2.2.1", + "@tiptap/extension-text": "^2.2.1", "@tiptap/pm": "^2.2.1", "@tiptap/starter-kit": "^2.2.1", "@tiptap/vue-3": "^2.2.1", diff --git a/package.json b/package.json index 437203ff..bbc38b62 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,11 @@ "@headlessui/vue": "^1.7.16", "@heroicons/vue": "^2.0.18", "@tiptap/extension-bubble-menu": "^2.2.1", + "@tiptap/extension-document": "^2.2.1", + "@tiptap/extension-list-item": "^2.2.1", + "@tiptap/extension-ordered-list": "^2.2.1", + "@tiptap/extension-paragraph": "^2.2.1", + "@tiptap/extension-text": "^2.2.1", "@tiptap/pm": "^2.2.1", "@tiptap/starter-kit": "^2.2.1", "@tiptap/vue-3": "^2.2.1", diff --git a/resources/js/Components/Blogs/CreateEditForm.vue b/resources/js/Components/Blogs/CreateEditForm.vue index 0422a37e..303fb39d 100644 --- a/resources/js/Components/Blogs/CreateEditForm.vue +++ b/resources/js/Components/Blogs/CreateEditForm.vue @@ -43,13 +43,16 @@ const form = useForm({ }) const submit = () => { - console.log(form.content) if (props.blog) { form.put(route('dashboard.blogs.update', props.blog)) } else { form.post(route('dashboard.blogs.store')) } } + +watch(content, (newValue) => { + console.log(newValue) +})