From d75a957183a26ee0314abda32bb96380d05fd6eb Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:35:43 +0200 Subject: [PATCH] Upgrade Tiptap from v2 to v3 (#597) - Upgrade @tiptap/core, starter-kit, vue-3, pm, extension-text-align to v3 - Remove @tiptap/extension-link (now bundled in StarterKit v3) - Move Link config into StarterKit.configure() --- package.json | 11 +++++------ .../components/base/base-editor/BaseEditor.vue | 8 +++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index a04e7dda..2bd95677 100644 --- a/package.json +++ b/package.json @@ -27,12 +27,11 @@ "@heroicons/vue": "^2.2.0", "@popperjs/core": "^2.11.8", "@stripe/stripe-js": "^2.4.0", - "@tiptap/core": "^2.11.2", - "@tiptap/extension-link": "^2.11.2", - "@tiptap/extension-text-align": "^2.11.2", - "@tiptap/pm": "^2.11.2", - "@tiptap/starter-kit": "^2.11.2", - "@tiptap/vue-3": "^2.11.2", + "@tiptap/core": "^3.0.0", + "@tiptap/extension-text-align": "^3.0.0", + "@tiptap/pm": "^3.0.0", + "@tiptap/starter-kit": "^3.0.0", + "@tiptap/vue-3": "^3.0.0", "@types/node": "^20.11.9", "@vuelidate/components": "^1.2.6", "@vuelidate/core": "^2.0.3", diff --git a/resources/scripts/components/base/base-editor/BaseEditor.vue b/resources/scripts/components/base/base-editor/BaseEditor.vue index a5436242..199a449a 100644 --- a/resources/scripts/components/base/base-editor/BaseEditor.vue +++ b/resources/scripts/components/base/base-editor/BaseEditor.vue @@ -73,7 +73,6 @@ import { ref, onUnmounted, watch, markRaw } from 'vue' import { useEditor, EditorContent } from '@tiptap/vue-3' import StarterKit from '@tiptap/starter-kit' import TextAlign from '@tiptap/extension-text-align' -import Link from '@tiptap/extension-link' import { EllipsisVerticalIcon } from '@heroicons/vue/24/outline' import { BoldIcon, @@ -114,14 +113,13 @@ export default { const editor = useEditor({ content: props.modelValue, extensions: [ - StarterKit, + StarterKit.configure({ + link: { openOnClick: false }, + }), TextAlign.configure({ types: ['heading', 'paragraph'], alignments: ['left', 'right', 'center', 'justify'], }), - Link.configure({ - openOnClick: false, - }), ], onUpdate: ({ editor }) => { emit('update:modelValue', editor.getHTML())