diff --git a/package.json b/package.json index d590a52..64f4320 100644 --- a/package.json +++ b/package.json @@ -16,16 +16,16 @@ "test": "pnpm playwright test --config ./test/playwright.config.ts" }, "devDependencies": { - "@changesets/cli": "^2.29.5", - "@playwright/test": "1.53.2", + "@changesets/cli": "^2.29.8", + "@playwright/test": "1.54.2", "@tailor-cms/cek-e2e": "^1.3.2", "@tailor-cms/eslint-config": "1.1.2", "@tailor-cms/tce-boot": "1.3.2", - "@types/node": "^24.0.12", - "dotenv": "^17.1.0", - "eslint": "^9.30.1", - "prettier": "^3.6.2", - "typescript": "^5.8.3" + "@types/node": "^24.10.2", + "dotenv": "^17.2.3", + "eslint": "^9.39.1", + "prettier": "^3.7.4", + "typescript": "^5.9.3" }, "packageManager": "pnpm@10.12.3" } diff --git a/packages/display/CHANGELOG.md b/packages/display/CHANGELOG.md index 4a6b47f..80ed140 100644 --- a/packages/display/CHANGELOG.md +++ b/packages/display/CHANGELOG.md @@ -1,5 +1,17 @@ # @tailor-cms/ce-html-display +## 0.2.1 + +### Patch Changes + +- Fix migration issues with new TipTap version and cleanup code. + +## 0.2.0 + +### Minor Changes + +- Bump Tiptap to v4 and migrate and cleanup text editor. + ## 0.1.6 ### Patch Changes diff --git a/packages/display/package.json b/packages/display/package.json index 1840bce..0e1dc08 100644 --- a/packages/display/package.json +++ b/packages/display/package.json @@ -3,7 +3,7 @@ "description": "Tailor CMS HTML editor end-user component", "author": "Studion (https://github.com/tailor-cms)", "type": "module", - "version": "0.1.6", + "version": "0.2.1", "exports": { ".": { "import": "./dist/index.js", @@ -30,10 +30,10 @@ "devDependencies": { "@tailor-cms/ce-html-manifest": "workspace:*", "@tailor-cms/eslint-config": "1.1.2", - "@vitejs/plugin-vue": "^6.0.0", - "typescript": "^5.8.3", - "vite": "^7.0.3", - "vue-tsc": "^3.0.1" + "@vitejs/plugin-vue": "^6.0.2", + "typescript": "^5.9.3", + "vite": "^7.2.7", + "vue-tsc": "^3.1.8" }, "publishConfig": { "access": "public" diff --git a/packages/edit/CHANGELOG.md b/packages/edit/CHANGELOG.md index db26e0c..223047f 100644 --- a/packages/edit/CHANGELOG.md +++ b/packages/edit/CHANGELOG.md @@ -1,5 +1,17 @@ # @tailor-cms/ce-html-edit +## 0.2.1 + +### Patch Changes + +- Fix migration issues with new TipTap version and cleanup code. + +## 0.2.0 + +### Minor Changes + +- Bump Tiptap to v4 and migrate and cleanup text editor. + ## 0.1.6 ### Patch Changes diff --git a/packages/edit/package.json b/packages/edit/package.json index 5ba1dd4..d5640c2 100644 --- a/packages/edit/package.json +++ b/packages/edit/package.json @@ -3,7 +3,7 @@ "description": "Tailor CMS HTML editor authoring component", "author": "Studion (https://github.com/tailor-cms)", "type": "module", - "version": "0.1.6", + "version": "0.2.1", "exports": { ".": { "import": "./dist/index.js", @@ -31,35 +31,28 @@ "@tailor-cms/ce-html-manifest": "workspace:*", "@tailor-cms/eslint-config": "1.1.2", "@types/lodash-es": "^4.17.12", - "@types/validator": "^13.15.2", - "@vitejs/plugin-vue": "^6.0.0", - "typescript": "^5.8.3", - "vite": "^7.0.3", - "vue-tsc": "^3.0.1" + "@types/validator": "^13.15.10", + "@vitejs/plugin-vue": "^6.0.2", + "typescript": "^5.9.3", + "vite": "^7.2.7", + "vue-tsc": "^3.1.8" }, "dependencies": { + "@floating-ui/dom": "^1.7.4", "@intevation/tiptap-extension-office-paste": "^0.1.2", - "@tiptap/extension-color": "^2.25.0", - "@tiptap/extension-font-family": "^2.25.0", - "@tiptap/extension-highlight": "^2.25.0", - "@tiptap/extension-image": "^2.25.0", - "@tiptap/extension-link": "^2.25.0", - "@tiptap/extension-paragraph": "^2.25.0", - "@tiptap/extension-placeholder": "^2.25.0", - "@tiptap/extension-subscript": "^2.25.0", - "@tiptap/extension-superscript": "^2.25.0", - "@tiptap/extension-table": "^2.25.0", - "@tiptap/extension-table-cell": "^2.25.0", - "@tiptap/extension-table-header": "^2.25.0", - "@tiptap/extension-table-row": "^2.25.0", - "@tiptap/extension-text-align": "^2.25.0", - "@tiptap/extension-text-style": "^2.25.0", - "@tiptap/extension-underline": "^2.25.0", - "@tiptap/pm": "^2.25.0", - "@tiptap/starter-kit": "^2.25.0", - "@tiptap/vue-3": "^2.25.0", + "@tiptap/extension-image": "^3.13.0", + "@tiptap/extension-link": "^3.13.0", + "@tiptap/extension-subscript": "^3.13.0", + "@tiptap/extension-superscript": "^3.13.0", + "@tiptap/extension-table": "^3.13.0", + "@tiptap/extension-text-align": "^3.13.0", + "@tiptap/extension-text-style": "^3.13.0", + "@tiptap/extensions": "^3.13.0", + "@tiptap/pm": "^3.13.0", + "@tiptap/starter-kit": "^3.13.0", + "@tiptap/vue-3": "^3.13.0", "lodash-es": "^4.17.21", - "validator": "^13.15.15" + "validator": "^13.15.23" }, "publishConfig": { "access": "public" diff --git a/packages/edit/src/components/Edit.vue b/packages/edit/src/components/Edit.vue index 5a0dfa2..47deeb1 100644 --- a/packages/edit/src/components/Edit.vue +++ b/packages/edit/src/components/Edit.vue @@ -1,7 +1,7 @@ @@ -56,9 +56,8 @@ watch( watch( () => props.element.data.content, (value) => { - if (!editor.value) return; - const isSame = editor.value.getHTML() === value; - return !isSame && editor.value?.commands.setContent(value, false); + if (!editor.value || editor.value.getHTML() === value) return; + return editor.value?.commands.setContent(value, { emitUpdate: false }); }, ); diff --git a/packages/edit/src/components/EditorToolbar.vue b/packages/edit/src/components/EditorToolbar.vue index 0c7e495..ec46391 100644 --- a/packages/edit/src/components/EditorToolbar.vue +++ b/packages/edit/src/components/EditorToolbar.vue @@ -31,13 +31,13 @@ import AddImage from './actions/AddImage.vue'; import AddLink from './actions/AddLink.vue'; import AddTable from './actions/AddTable.vue'; import AddTooltip from './actions/AddTooltip.vue'; +import BackgroundColor from './actions/BackgroundColor.vue'; import FontFamily from './actions/FontFamily.vue'; import FontSize from './actions/FontSize.vue'; import IconButton from './IconButton.vue'; import TextAlign from './actions/TextAlign.vue'; import TextColor from './actions/TextColor.vue'; import TextHeading from './actions/TextHeading.vue'; -import TextHighlight from './actions/TextHighlight.vue'; defineProps<{ editor: any }>(); @@ -99,7 +99,7 @@ const toolbarItems: (Action | Component)[][] = [ icon: 'minus', }, ], - [{ component: TextColor }, { component: TextHighlight }], + [{ component: TextColor }, { component: BackgroundColor }], [ { label: 'Numbered list', diff --git a/packages/edit/src/components/IconButton.vue b/packages/edit/src/components/IconButton.vue index 80d39e5..a481ef8 100644 --- a/packages/edit/src/components/IconButton.vue +++ b/packages/edit/src/components/IconButton.vue @@ -1,5 +1,5 @@