From 7f7f93dc1b4b56c7647de27a792e000b3513c226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sat, 2 Oct 2021 23:18:12 +0200 Subject: [PATCH 01/16] fix: fix reactive props, see #1728 --- packages/vue-3/src/VueNodeViewRenderer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue-3/src/VueNodeViewRenderer.ts b/packages/vue-3/src/VueNodeViewRenderer.ts index 1b8abb7c..d2af9deb 100644 --- a/packages/vue-3/src/VueNodeViewRenderer.ts +++ b/packages/vue-3/src/VueNodeViewRenderer.ts @@ -88,11 +88,11 @@ class VueNodeView extends NodeView { + setup: reactiveProps => { provide('onDragStart', onDragStart) provide('decorationClasses', this.decorationClasses) - return (this.component as any).setup?.(props, { + return (this.component as any).setup?.(reactiveProps, { expose: () => undefined, }) }, From dc868b3d2a034abbd308da63057a6ae52c194b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sat, 2 Oct 2021 23:20:38 +0200 Subject: [PATCH 02/16] Publish - @tiptap/core@2.0.0-beta.117 - @tiptap/extension-bubble-menu@2.0.0-beta.39 - @tiptap/extension-code-block-lowlight@2.0.0-beta.41 - @tiptap/extension-floating-menu@2.0.0-beta.33 - @tiptap/extension-gapcursor@2.0.0-beta.24 - @tiptap/extension-hard-break@2.0.0-beta.21 - @tiptap/extension-highlight@2.0.0-beta.21 - @tiptap/extension-horizontal-rule@2.0.0-beta.21 - @tiptap/html@2.0.0-beta.116 - @tiptap/react@2.0.0-beta.78 - @tiptap/starter-kit@2.0.0-beta.116 - @tiptap/vue-2@2.0.0-beta.57 - @tiptap/vue-3@2.0.0-beta.67 --- packages/core/CHANGELOG.md | 8 ++++++++ packages/core/package.json | 2 +- packages/extension-bubble-menu/CHANGELOG.md | 8 ++++++++ packages/extension-bubble-menu/package.json | 2 +- packages/extension-code-block-lowlight/CHANGELOG.md | 8 ++++++++ packages/extension-code-block-lowlight/package.json | 2 +- packages/extension-floating-menu/CHANGELOG.md | 8 ++++++++ packages/extension-floating-menu/package.json | 2 +- packages/extension-gapcursor/CHANGELOG.md | 8 ++++++++ packages/extension-gapcursor/package.json | 2 +- packages/extension-hard-break/CHANGELOG.md | 8 ++++++++ packages/extension-hard-break/package.json | 2 +- packages/extension-highlight/CHANGELOG.md | 8 ++++++++ packages/extension-highlight/package.json | 2 +- packages/extension-horizontal-rule/CHANGELOG.md | 8 ++++++++ packages/extension-horizontal-rule/package.json | 2 +- packages/html/CHANGELOG.md | 8 ++++++++ packages/html/package.json | 4 ++-- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package.json | 6 +++--- packages/starter-kit/CHANGELOG.md | 8 ++++++++ packages/starter-kit/package.json | 10 +++++----- packages/vue-2/CHANGELOG.md | 8 ++++++++ packages/vue-2/package.json | 6 +++--- packages/vue-3/CHANGELOG.md | 11 +++++++++++ packages/vue-3/package.json | 6 +++--- 26 files changed, 131 insertions(+), 24 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index e9dcf31f..61a51d52 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.116...@tiptap/core@2.0.0-beta.117) (2021-10-02) + +**Note:** Version bump only for package @tiptap/core + + + + + # [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.115...@tiptap/core@2.0.0-beta.116) (2021-09-30) diff --git a/packages/core/package.json b/packages/core/package.json index e9897aa7..b977e4b3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/core", "description": "headless rich text editor", - "version": "2.0.0-beta.116", + "version": "2.0.0-beta.117", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-bubble-menu/CHANGELOG.md b/packages/extension-bubble-menu/CHANGELOG.md index c68548df..3615c16d 100644 --- a/packages/extension-bubble-menu/CHANGELOG.md +++ b/packages/extension-bubble-menu/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.39](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.38...@tiptap/extension-bubble-menu@2.0.0-beta.39) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-bubble-menu + + + + + # [2.0.0-beta.38](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.37...@tiptap/extension-bubble-menu@2.0.0-beta.38) (2021-09-29) **Note:** Version bump only for package @tiptap/extension-bubble-menu diff --git a/packages/extension-bubble-menu/package.json b/packages/extension-bubble-menu/package.json index 3b86752a..fa6c6617 100644 --- a/packages/extension-bubble-menu/package.json +++ b/packages/extension-bubble-menu/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-bubble-menu", "description": "bubble-menu extension for tiptap", - "version": "2.0.0-beta.38", + "version": "2.0.0-beta.39", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-code-block-lowlight/CHANGELOG.md b/packages/extension-code-block-lowlight/CHANGELOG.md index 5357a80e..fcadbfaa 100644 --- a/packages/extension-code-block-lowlight/CHANGELOG.md +++ b/packages/extension-code-block-lowlight/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.41](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.40...@tiptap/extension-code-block-lowlight@2.0.0-beta.41) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-code-block-lowlight + + + + + # [2.0.0-beta.40](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.39...@tiptap/extension-code-block-lowlight@2.0.0-beta.40) (2021-09-30) diff --git a/packages/extension-code-block-lowlight/package.json b/packages/extension-code-block-lowlight/package.json index 59c15923..67863966 100644 --- a/packages/extension-code-block-lowlight/package.json +++ b/packages/extension-code-block-lowlight/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-code-block-lowlight", "description": "code block extension for tiptap", - "version": "2.0.0-beta.40", + "version": "2.0.0-beta.41", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-floating-menu/CHANGELOG.md b/packages/extension-floating-menu/CHANGELOG.md index 7e1ecfdc..791820f5 100644 --- a/packages/extension-floating-menu/CHANGELOG.md +++ b/packages/extension-floating-menu/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.33](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.32...@tiptap/extension-floating-menu@2.0.0-beta.33) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-floating-menu + + + + + # [2.0.0-beta.32](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.31...@tiptap/extension-floating-menu@2.0.0-beta.32) (2021-09-29) **Note:** Version bump only for package @tiptap/extension-floating-menu diff --git a/packages/extension-floating-menu/package.json b/packages/extension-floating-menu/package.json index 0f003c2f..78389c90 100644 --- a/packages/extension-floating-menu/package.json +++ b/packages/extension-floating-menu/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-floating-menu", "description": "floating-menu extension for tiptap", - "version": "2.0.0-beta.32", + "version": "2.0.0-beta.33", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-gapcursor/CHANGELOG.md b/packages/extension-gapcursor/CHANGELOG.md index 17a8d563..34caa99d 100644 --- a/packages/extension-gapcursor/CHANGELOG.md +++ b/packages/extension-gapcursor/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.24](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.23...@tiptap/extension-gapcursor@2.0.0-beta.24) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-gapcursor + + + + + # [2.0.0-beta.23](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.22...@tiptap/extension-gapcursor@2.0.0-beta.23) (2021-09-29) **Note:** Version bump only for package @tiptap/extension-gapcursor diff --git a/packages/extension-gapcursor/package.json b/packages/extension-gapcursor/package.json index 0b900f16..96ded2b1 100644 --- a/packages/extension-gapcursor/package.json +++ b/packages/extension-gapcursor/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-gapcursor", "description": "gapcursor extension for tiptap", - "version": "2.0.0-beta.23", + "version": "2.0.0-beta.24", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-hard-break/CHANGELOG.md b/packages/extension-hard-break/CHANGELOG.md index 85af41de..e4d14f7b 100644 --- a/packages/extension-hard-break/CHANGELOG.md +++ b/packages/extension-hard-break/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.20...@tiptap/extension-hard-break@2.0.0-beta.21) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-hard-break + + + + + # [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.19...@tiptap/extension-hard-break@2.0.0-beta.20) (2021-09-29) **Note:** Version bump only for package @tiptap/extension-hard-break diff --git a/packages/extension-hard-break/package.json b/packages/extension-hard-break/package.json index b47a2667..d2ae04d2 100644 --- a/packages/extension-hard-break/package.json +++ b/packages/extension-hard-break/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-hard-break", "description": "hard break extension for tiptap", - "version": "2.0.0-beta.20", + "version": "2.0.0-beta.21", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-highlight/CHANGELOG.md b/packages/extension-highlight/CHANGELOG.md index f3e92e3f..a032596c 100644 --- a/packages/extension-highlight/CHANGELOG.md +++ b/packages/extension-highlight/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.20...@tiptap/extension-highlight@2.0.0-beta.21) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-highlight + + + + + # [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.19...@tiptap/extension-highlight@2.0.0-beta.20) (2021-09-29) **Note:** Version bump only for package @tiptap/extension-highlight diff --git a/packages/extension-highlight/package.json b/packages/extension-highlight/package.json index 5bb81770..9eb1ec92 100644 --- a/packages/extension-highlight/package.json +++ b/packages/extension-highlight/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-highlight", "description": "highlight extension for tiptap", - "version": "2.0.0-beta.20", + "version": "2.0.0-beta.21", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-horizontal-rule/CHANGELOG.md b/packages/extension-horizontal-rule/CHANGELOG.md index e64ada4f..0a84d53d 100644 --- a/packages/extension-horizontal-rule/CHANGELOG.md +++ b/packages/extension-horizontal-rule/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.20...@tiptap/extension-horizontal-rule@2.0.0-beta.21) (2021-10-02) + +**Note:** Version bump only for package @tiptap/extension-horizontal-rule + + + + + # [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.19...@tiptap/extension-horizontal-rule@2.0.0-beta.20) (2021-09-29) diff --git a/packages/extension-horizontal-rule/package.json b/packages/extension-horizontal-rule/package.json index 94aec61d..8b75fb2c 100644 --- a/packages/extension-horizontal-rule/package.json +++ b/packages/extension-horizontal-rule/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-horizontal-rule", "description": "horizontal rule extension for tiptap", - "version": "2.0.0-beta.20", + "version": "2.0.0-beta.21", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/html/CHANGELOG.md b/packages/html/CHANGELOG.md index f9a76f64..fe7b5637 100644 --- a/packages/html/CHANGELOG.md +++ b/packages/html/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.115...@tiptap/html@2.0.0-beta.116) (2021-10-02) + +**Note:** Version bump only for package @tiptap/html + + + + + # [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.114...@tiptap/html@2.0.0-beta.115) (2021-09-30) **Note:** Version bump only for package @tiptap/html diff --git a/packages/html/package.json b/packages/html/package.json index ab8520e9..4070803e 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/html", "description": "utility package to render tiptap JSON as HTML", - "version": "2.0.0-beta.115", + "version": "2.0.0-beta.116", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.116", + "@tiptap/core": "^2.0.0-beta.117", "hostic-dom": "^0.8.7", "prosemirror-model": "^1.14.3" }, diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 3816f44a..99c5d7ab 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.78](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.77...@tiptap/react@2.0.0-beta.78) (2021-10-02) + +**Note:** Version bump only for package @tiptap/react + + + + + # [2.0.0-beta.77](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.76...@tiptap/react@2.0.0-beta.77) (2021-09-30) diff --git a/packages/react/package.json b/packages/react/package.json index 8cc92e78..7bf119bd 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/react", "description": "React components for tiptap", - "version": "2.0.0-beta.77", + "version": "2.0.0-beta.78", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -32,8 +32,8 @@ "react-dom": "^17.0.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", - "@tiptap/extension-floating-menu": "^2.0.0-beta.32", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.39", + "@tiptap/extension-floating-menu": "^2.0.0-beta.33", "prosemirror-view": "^1.20.1" }, "repository": { diff --git a/packages/starter-kit/CHANGELOG.md b/packages/starter-kit/CHANGELOG.md index 1b50df79..08363ee1 100644 --- a/packages/starter-kit/CHANGELOG.md +++ b/packages/starter-kit/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.115...@tiptap/starter-kit@2.0.0-beta.116) (2021-10-02) + +**Note:** Version bump only for package @tiptap/starter-kit + + + + + # [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.114...@tiptap/starter-kit@2.0.0-beta.115) (2021-09-30) **Note:** Version bump only for package @tiptap/starter-kit diff --git a/packages/starter-kit/package.json b/packages/starter-kit/package.json index ea6b5518..3751b7ee 100644 --- a/packages/starter-kit/package.json +++ b/packages/starter-kit/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/starter-kit", "description": "starter kit for tiptap", - "version": "2.0.0-beta.115", + "version": "2.0.0-beta.116", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.116", + "@tiptap/core": "^2.0.0-beta.117", "@tiptap/extension-blockquote": "^2.0.0-beta.15", "@tiptap/extension-bold": "^2.0.0-beta.15", "@tiptap/extension-bullet-list": "^2.0.0-beta.15", @@ -29,11 +29,11 @@ "@tiptap/extension-code-block": "^2.0.0-beta.18", "@tiptap/extension-document": "^2.0.0-beta.13", "@tiptap/extension-dropcursor": "^2.0.0-beta.19", - "@tiptap/extension-gapcursor": "^2.0.0-beta.23", - "@tiptap/extension-hard-break": "^2.0.0-beta.20", + "@tiptap/extension-gapcursor": "^2.0.0-beta.24", + "@tiptap/extension-hard-break": "^2.0.0-beta.21", "@tiptap/extension-heading": "^2.0.0-beta.15", "@tiptap/extension-history": "^2.0.0-beta.16", - "@tiptap/extension-horizontal-rule": "^2.0.0-beta.20", + "@tiptap/extension-horizontal-rule": "^2.0.0-beta.21", "@tiptap/extension-italic": "^2.0.0-beta.15", "@tiptap/extension-list-item": "^2.0.0-beta.14", "@tiptap/extension-ordered-list": "^2.0.0-beta.16", diff --git a/packages/vue-2/CHANGELOG.md b/packages/vue-2/CHANGELOG.md index 414c8c89..4ef27425 100644 --- a/packages/vue-2/CHANGELOG.md +++ b/packages/vue-2/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.56...@tiptap/vue-2@2.0.0-beta.57) (2021-10-02) + +**Note:** Version bump only for package @tiptap/vue-2 + + + + + # [2.0.0-beta.56](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.55...@tiptap/vue-2@2.0.0-beta.56) (2021-09-29) **Note:** Version bump only for package @tiptap/vue-2 diff --git a/packages/vue-2/package.json b/packages/vue-2/package.json index 5e51a4a7..36107b7f 100644 --- a/packages/vue-2/package.json +++ b/packages/vue-2/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/vue-2", "description": "Vue components for tiptap", - "version": "2.0.0-beta.56", + "version": "2.0.0-beta.57", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -28,8 +28,8 @@ "vue": "^2.6.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", - "@tiptap/extension-floating-menu": "^2.0.0-beta.32", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.39", + "@tiptap/extension-floating-menu": "^2.0.0-beta.33", "prosemirror-view": "^1.20.1" }, "repository": { diff --git a/packages/vue-3/CHANGELOG.md b/packages/vue-3/CHANGELOG.md index 30bbe150..20ac79fb 100644 --- a/packages/vue-3/CHANGELOG.md +++ b/packages/vue-3/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.67](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.66...@tiptap/vue-3@2.0.0-beta.67) (2021-10-02) + + +### Bug Fixes + +* fix reactive props, see [#1728](https://github.com/ueberdosis/tiptap/issues/1728) ([7f7f93d](https://github.com/ueberdosis/tiptap/commit/7f7f93dc1b4b56c7647de27a792e000b3513c226)) + + + + + # [2.0.0-beta.66](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.65...@tiptap/vue-3@2.0.0-beta.66) (2021-09-29) **Note:** Version bump only for package @tiptap/vue-3 diff --git a/packages/vue-3/package.json b/packages/vue-3/package.json index 91163a48..2eabed47 100644 --- a/packages/vue-3/package.json +++ b/packages/vue-3/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/vue-3", "description": "Vue components for tiptap", - "version": "2.0.0-beta.66", + "version": "2.0.0-beta.67", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -28,8 +28,8 @@ "vue": "^3.0.0" }, "dependencies": { - "@tiptap/extension-bubble-menu": "^2.0.0-beta.38", - "@tiptap/extension-floating-menu": "^2.0.0-beta.32", + "@tiptap/extension-bubble-menu": "^2.0.0-beta.39", + "@tiptap/extension-floating-menu": "^2.0.0-beta.33", "prosemirror-state": "^1.3.4", "prosemirror-view": "^1.20.1" }, From f8efdf797a10a01235b75091729b15aca076e47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 3 Oct 2021 18:55:33 +0200 Subject: [PATCH 03/16] fix: fix order of executed plugins, fix #1547 --- packages/core/src/ExtensionManager.ts | 8 ++- .../integration/core/pluginOrder.spec.ts | 69 +++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 tests/cypress/integration/core/pluginOrder.spec.ts diff --git a/packages/core/src/ExtensionManager.ts b/packages/core/src/ExtensionManager.ts index a8e73bf4..53d861cf 100644 --- a/packages/core/src/ExtensionManager.ts +++ b/packages/core/src/ExtensionManager.ts @@ -205,8 +205,12 @@ export default class ExtensionManager { } get plugins(): Plugin[] { - return [...this.extensions] - .reverse() + // With ProseMirror, first plugins within an array are executed first. + // In tiptap, we provide the ability to override plugins, + // so it feels more natural to run plugins at the end of an array first. + // That’s why we have to reverse the `extensions` array and sort again + // based on the `priority` option. + return ExtensionManager.sort([...this.extensions].reverse()) .map(extension => { const context = { name: extension.name, diff --git a/tests/cypress/integration/core/pluginOrder.spec.ts b/tests/cypress/integration/core/pluginOrder.spec.ts new file mode 100644 index 00000000..ddc50c35 --- /dev/null +++ b/tests/cypress/integration/core/pluginOrder.spec.ts @@ -0,0 +1,69 @@ +/// + +import { Editor, Extension } from '@tiptap/core' +import Document from '@tiptap/extension-document' +import Paragraph from '@tiptap/extension-paragraph' +import Text from '@tiptap/extension-text' + +describe('pluginOrder', () => { + it('should run keyboard shortcuts in correct order', () => { + const order: number[] = [] + + cy.window().then(({ document }) => { + const element = document.createElement('div') + + document.body.append(element) + + const editor = new Editor({ + element, + extensions: [ + Document, + Paragraph, + Text, + Extension.create({ + priority: 1000, + addKeyboardShortcuts() { + return { + a: () => { + order.push(1) + + return false + }, + } + }, + }), + Extension.create({ + addKeyboardShortcuts() { + return { + a: () => { + order.push(3) + + return false + }, + } + }, + }), + Extension.create({ + addKeyboardShortcuts() { + return { + a: () => { + order.push(2) + + return false + }, + } + }, + }), + ], + }) + + cy.get('.ProseMirror') + .type('a') + .wait(100).then(() => { + expect(order).to.deep.eq([1, 2, 3]) + + editor.destroy() + }) + }) + }) +}) From 4feb4ee36e07678c0e946b1ec853634f2e1700ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 3 Oct 2021 18:58:02 +0200 Subject: [PATCH 04/16] Publish - @tiptap/core@2.0.0-beta.118 - @tiptap/html@2.0.0-beta.117 - @tiptap/starter-kit@2.0.0-beta.117 --- packages/core/CHANGELOG.md | 11 +++++++++++ packages/core/package.json | 2 +- packages/html/CHANGELOG.md | 8 ++++++++ packages/html/package.json | 4 ++-- packages/starter-kit/CHANGELOG.md | 8 ++++++++ packages/starter-kit/package.json | 4 ++-- 6 files changed, 32 insertions(+), 5 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 61a51d52..6f0bb866 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.118](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.117...@tiptap/core@2.0.0-beta.118) (2021-10-03) + + +### Bug Fixes + +* fix order of executed plugins, fix [#1547](https://github.com/ueberdosis/tiptap/issues/1547) ([f8efdf7](https://github.com/ueberdosis/tiptap/commit/f8efdf797a10a01235b75091729b15aca076e47a)) + + + + + # [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.116...@tiptap/core@2.0.0-beta.117) (2021-10-02) **Note:** Version bump only for package @tiptap/core diff --git a/packages/core/package.json b/packages/core/package.json index b977e4b3..aafd5fc2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/core", "description": "headless rich text editor", - "version": "2.0.0-beta.117", + "version": "2.0.0-beta.118", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/html/CHANGELOG.md b/packages/html/CHANGELOG.md index fe7b5637..1473b32e 100644 --- a/packages/html/CHANGELOG.md +++ b/packages/html/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.116...@tiptap/html@2.0.0-beta.117) (2021-10-03) + +**Note:** Version bump only for package @tiptap/html + + + + + # [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.115...@tiptap/html@2.0.0-beta.116) (2021-10-02) **Note:** Version bump only for package @tiptap/html diff --git a/packages/html/package.json b/packages/html/package.json index 4070803e..8bdcc664 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/html", "description": "utility package to render tiptap JSON as HTML", - "version": "2.0.0-beta.116", + "version": "2.0.0-beta.117", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.117", + "@tiptap/core": "^2.0.0-beta.118", "hostic-dom": "^0.8.7", "prosemirror-model": "^1.14.3" }, diff --git a/packages/starter-kit/CHANGELOG.md b/packages/starter-kit/CHANGELOG.md index 08363ee1..7f6cd6ff 100644 --- a/packages/starter-kit/CHANGELOG.md +++ b/packages/starter-kit/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.116...@tiptap/starter-kit@2.0.0-beta.117) (2021-10-03) + +**Note:** Version bump only for package @tiptap/starter-kit + + + + + # [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.115...@tiptap/starter-kit@2.0.0-beta.116) (2021-10-02) **Note:** Version bump only for package @tiptap/starter-kit diff --git a/packages/starter-kit/package.json b/packages/starter-kit/package.json index 3751b7ee..ccf88cb2 100644 --- a/packages/starter-kit/package.json +++ b/packages/starter-kit/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/starter-kit", "description": "starter kit for tiptap", - "version": "2.0.0-beta.116", + "version": "2.0.0-beta.117", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", @@ -21,7 +21,7 @@ "dist" ], "dependencies": { - "@tiptap/core": "^2.0.0-beta.117", + "@tiptap/core": "^2.0.0-beta.118", "@tiptap/extension-blockquote": "^2.0.0-beta.15", "@tiptap/extension-bold": "^2.0.0-beta.15", "@tiptap/extension-bullet-list": "^2.0.0-beta.15", From 92b6c5bdcef4589acaa824c2fc599787c02c1832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 3 Oct 2021 20:33:33 +0200 Subject: [PATCH 05/16] feat: add isChangeOrigin helper method --- packages/extension-collaboration/package.json | 1 + .../extension-collaboration/src/helpers/isChangeOrigin.ts | 6 ++++++ packages/extension-collaboration/src/index.ts | 1 + 3 files changed, 8 insertions(+) create mode 100644 packages/extension-collaboration/src/helpers/isChangeOrigin.ts diff --git a/packages/extension-collaboration/package.json b/packages/extension-collaboration/package.json index 6c85c4be..3e6be56a 100644 --- a/packages/extension-collaboration/package.json +++ b/packages/extension-collaboration/package.json @@ -24,6 +24,7 @@ "@tiptap/core": "^2.0.0-beta.1" }, "dependencies": { + "prosemirror-state": "^1.3.4", "y-prosemirror": "^1.0.9" }, "repository": { diff --git a/packages/extension-collaboration/src/helpers/isChangeOrigin.ts b/packages/extension-collaboration/src/helpers/isChangeOrigin.ts new file mode 100644 index 00000000..285ec21d --- /dev/null +++ b/packages/extension-collaboration/src/helpers/isChangeOrigin.ts @@ -0,0 +1,6 @@ +import { ySyncPluginKey } from 'y-prosemirror' +import { Transaction } from 'prosemirror-state' + +export function isChangeOrigin(transaction: Transaction): boolean { + return !!transaction.getMeta(ySyncPluginKey) +} diff --git a/packages/extension-collaboration/src/index.ts b/packages/extension-collaboration/src/index.ts index 03ed9383..a81f764b 100644 --- a/packages/extension-collaboration/src/index.ts +++ b/packages/extension-collaboration/src/index.ts @@ -1,5 +1,6 @@ import { Collaboration } from './collaboration' export * from './collaboration' +export * from './helpers/isChangeOrigin' export default Collaboration From 68fc3f862f1a1a4a5e6a5e1c6c837083fc1166f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 3 Oct 2021 20:38:08 +0200 Subject: [PATCH 06/16] Publish - @tiptap/extension-collaboration@2.0.0-beta.21 --- packages/extension-collaboration/CHANGELOG.md | 11 +++++++++++ packages/extension-collaboration/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/extension-collaboration/CHANGELOG.md b/packages/extension-collaboration/CHANGELOG.md index 940ed18f..1a56e07d 100644 --- a/packages/extension-collaboration/CHANGELOG.md +++ b/packages/extension-collaboration/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.20...@tiptap/extension-collaboration@2.0.0-beta.21) (2021-10-03) + + +### Features + +* add isChangeOrigin helper method ([92b6c5b](https://github.com/ueberdosis/tiptap/commit/92b6c5bdcef4589acaa824c2fc599787c02c1832)) + + + + + # [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.19...@tiptap/extension-collaboration@2.0.0-beta.20) (2021-07-26) **Note:** Version bump only for package @tiptap/extension-collaboration diff --git a/packages/extension-collaboration/package.json b/packages/extension-collaboration/package.json index 3e6be56a..a4a591d5 100644 --- a/packages/extension-collaboration/package.json +++ b/packages/extension-collaboration/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-collaboration", "description": "collaboration extension for tiptap", - "version": "2.0.0-beta.20", + "version": "2.0.0-beta.21", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", From 9e58f3ad55a2c5728c16152f68b0dcda9da5d112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sun, 3 Oct 2021 20:53:30 +0200 Subject: [PATCH 07/16] docs: update content --- docs/api/extensions.md | 2 +- docs/api/extensions/unique-id.md | 6 +++--- docs/links.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/extensions.md b/docs/api/extensions.md index 2d5b318d..998052ec 100644 --- a/docs/api/extensions.md +++ b/docs/api/extensions.md @@ -23,7 +23,7 @@ There are also some extensions with more capabilities. We call them [nodes](/api | [History](/api/extensions/history) | Included | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-history/) | | [Placeholder](/api/extensions/placeholder) | – | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-placeholder/) | | [TextAlign](/api/extensions/text-align) | – | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text-align/) | -| [UniqueId](/api/extensions/unique-id) | – | Requires a tiptap pro subscription | +| [UniqueID](/api/extensions/unique-id) | – | Requires a tiptap pro subscription | | [Typography](/api/extensions/typography) | – | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-typography/) | You don’t have to use it, but we prepared a `@tiptap/starter-kit` which includes the most common extensions. Read more about [`StarterKit`](/guide/configuration#default-extensions). diff --git a/docs/api/extensions/unique-id.md b/docs/api/extensions/unique-id.md index 97ac6622..a4c11926 100644 --- a/docs/api/extensions/unique-id.md +++ b/docs/api/extensions/unique-id.md @@ -1,8 +1,8 @@ -# UniqueId -The `UniqueId` extension adds unique IDs to all nodes. The extension keeps track of your nodes, even if you split them, merge them, undo/redo changes, crop content, paste content … It just works. +# UniqueID +The `UniqueID` extension adds unique IDs to all nodes. The extension keeps track of your nodes, even if you split them, merge them, undo/redo changes, crop content, paste content … It just works. Also, you can configure which node types get an unique ID, and which not, and you can customize how those IDs are generated. :::pro Pro extension -The UniqueId extension is the first tiptap pro extension we have released on top of all the free extensions. Access to the extension and the documentation requires a tiptap pro subscription. [Become a tiptap pro now!](/pricing) +The UniqueID extension is the first tiptap pro extension we have released on top of all the free extensions. Access to the extension and the documentation requires a tiptap pro subscription. [Become a tiptap pro now!](/pricing) ::: diff --git a/docs/links.yaml b/docs/links.yaml index b7873d29..135ce6a0 100644 --- a/docs/links.yaml +++ b/docs/links.yaml @@ -361,7 +361,7 @@ link: /api/extensions/text-align - title: Typography link: /api/extensions/typography - - title: UniqueId + - title: UniqueID link: /api/extensions/unique-id type: pro - title: Utilities From 2b16c2ea9633529657debff3cdbc74ff3a26b985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 4 Oct 2021 06:53:59 +0200 Subject: [PATCH 08/16] fix: fix plugin order for collab, fix #1973 --- .../extension-collaboration-cursor/src/collaboration-cursor.ts | 2 -- packages/extension-collaboration/src/collaboration.ts | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/extension-collaboration-cursor/src/collaboration-cursor.ts b/packages/extension-collaboration-cursor/src/collaboration-cursor.ts index 5ac60fc2..53870a56 100644 --- a/packages/extension-collaboration-cursor/src/collaboration-cursor.ts +++ b/packages/extension-collaboration-cursor/src/collaboration-cursor.ts @@ -31,8 +31,6 @@ const awarenessStatesToArray = (states: Map>) => { export const CollaborationCursor = Extension.create({ name: 'collaborationCursor', - priority: 1000, - defaultOptions: { provider: null, user: { diff --git a/packages/extension-collaboration/src/collaboration.ts b/packages/extension-collaboration/src/collaboration.ts index e0ce339d..eed8078c 100644 --- a/packages/extension-collaboration/src/collaboration.ts +++ b/packages/extension-collaboration/src/collaboration.ts @@ -41,6 +41,8 @@ export interface CollaborationOptions { export const Collaboration = Extension.create({ name: 'collaboration', + priority: 1000, + defaultOptions: { document: null, field: 'default', From 3a9d6201f0602d4c84ed927b2da469c4ba1d169f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 4 Oct 2021 06:54:34 +0200 Subject: [PATCH 09/16] Publish - @tiptap/extension-collaboration-cursor@2.0.0-beta.22 - @tiptap/extension-collaboration@2.0.0-beta.22 --- packages/extension-collaboration-cursor/CHANGELOG.md | 11 +++++++++++ packages/extension-collaboration-cursor/package.json | 2 +- packages/extension-collaboration/CHANGELOG.md | 11 +++++++++++ packages/extension-collaboration/package.json | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/extension-collaboration-cursor/CHANGELOG.md b/packages/extension-collaboration-cursor/CHANGELOG.md index e46484dd..391dbc2e 100644 --- a/packages/extension-collaboration-cursor/CHANGELOG.md +++ b/packages/extension-collaboration-cursor/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration-cursor@2.0.0-beta.21...@tiptap/extension-collaboration-cursor@2.0.0-beta.22) (2021-10-04) + + +### Bug Fixes + +* fix plugin order for collab, fix [#1973](https://github.com/ueberdosis/tiptap/issues/1973) ([2b16c2e](https://github.com/ueberdosis/tiptap/commit/2b16c2ea9633529657debff3cdbc74ff3a26b985)) + + + + + # [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration-cursor@2.0.0-beta.20...@tiptap/extension-collaboration-cursor@2.0.0-beta.21) (2021-07-26) **Note:** Version bump only for package @tiptap/extension-collaboration-cursor diff --git a/packages/extension-collaboration-cursor/package.json b/packages/extension-collaboration-cursor/package.json index 4c9958c6..31002b11 100644 --- a/packages/extension-collaboration-cursor/package.json +++ b/packages/extension-collaboration-cursor/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-collaboration-cursor", "description": "collaboration cursor extension for tiptap", - "version": "2.0.0-beta.21", + "version": "2.0.0-beta.22", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", diff --git a/packages/extension-collaboration/CHANGELOG.md b/packages/extension-collaboration/CHANGELOG.md index 1a56e07d..4204a042 100644 --- a/packages/extension-collaboration/CHANGELOG.md +++ b/packages/extension-collaboration/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.21...@tiptap/extension-collaboration@2.0.0-beta.22) (2021-10-04) + + +### Bug Fixes + +* fix plugin order for collab, fix [#1973](https://github.com/ueberdosis/tiptap/issues/1973) ([2b16c2e](https://github.com/ueberdosis/tiptap/commit/2b16c2ea9633529657debff3cdbc74ff3a26b985)) + + + + + # [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.20...@tiptap/extension-collaboration@2.0.0-beta.21) (2021-10-03) diff --git a/packages/extension-collaboration/package.json b/packages/extension-collaboration/package.json index a4a591d5..59178b24 100644 --- a/packages/extension-collaboration/package.json +++ b/packages/extension-collaboration/package.json @@ -1,7 +1,7 @@ { "name": "@tiptap/extension-collaboration", "description": "collaboration extension for tiptap", - "version": "2.0.0-beta.21", + "version": "2.0.0-beta.22", "homepage": "https://tiptap.dev", "keywords": [ "tiptap", From 56d3b0b9b8e72d238a12ee7e2e83ce9d7818a93a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 19:40:38 +0200 Subject: [PATCH 10/16] build(deps): bump actions/setup-node from 2.4.0 to 2.4.1 (#1978) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85f51bae..44ef996a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v2.3.4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@v2.3.4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} @@ -139,7 +139,7 @@ jobs: - uses: actions/checkout@v2.3.4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} From 25d3c57b704c27c2dc3afc339f3f520465efed4e Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 6 Oct 2021 21:03:24 +0200 Subject: [PATCH 11/16] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ac8a56c6..c9575c81 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,12 @@ For help, discussion about best practices, or any other conversation that would Gamma + + +
+ Storyblok +
+ From 9255a951a789ec9e1a09f3275bcb10eb66d6f622 Mon Sep 17 00:00:00 2001 From: David Krijgsman Date: Thu, 7 Oct 2021 13:09:54 +0200 Subject: [PATCH 12/16] docs: Fix typo in hard-break.md (#1988) --- docs/api/nodes/hard-break.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/nodes/hard-break.md b/docs/api/nodes/hard-break.md index f987b46f..9eb7d518 100644 --- a/docs/api/nodes/hard-break.md +++ b/docs/api/nodes/hard-break.md @@ -43,7 +43,7 @@ HardBreak.configure({ Add a line break. ```js -editor.commands.setHeardBreak() +editor.commands.setHardBreak() ``` ## Keyboard shortcuts From 2be975ff1f3f93b9eaf2e50d7775ac6154440f28 Mon Sep 17 00:00:00 2001 From: Aron Buzinkay <25285064+alb@users.noreply.github.com> Date: Thu, 7 Oct 2021 13:15:45 +0200 Subject: [PATCH 13/16] docs: Added Next.js installation guide & express setup for React (#1984) * Added Next.js installation guide & express setup for React * Update react.md Co-authored-by: Hans Pagel --- docs/installation.md | 1 + docs/installation/nextjs.md | 75 +++++++++++++++++++++++++++++++++++++ docs/installation/react.md | 8 ++++ 3 files changed, 84 insertions(+) create mode 100644 docs/installation/nextjs.md diff --git a/docs/installation.md b/docs/installation.md index ee4b6076..74245f3c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -10,6 +10,7 @@ tiptap is framework-agnostic and even works with Vanilla JavaScript (if that’s ## Integration guides * [CDN](/installation/cdn) * [React](/installation/react) +* [Next.js](/installation/nextjs) * [Vue 3](/installation/vue3) * [Vue 2](/installation/vue2) * [Nuxt.js](/installation/nuxt) diff --git a/docs/installation/nextjs.md b/docs/installation/nextjs.md new file mode 100644 index 00000000..f752b1b6 --- /dev/null +++ b/docs/installation/nextjs.md @@ -0,0 +1,75 @@ +--- +title: Next.js WYSIWYG +tableOfContents: true +--- + +# Next.js + +## Introduction +The following guide describes how to integrate tiptap with your [Next.js](https://nextjs.org/) project. + +## Requirements +* [Node](https://nodejs.org/en/download/) installed on your machine +* Experience with [React](https://reactjs.org/) + +## 1. Create a project (optional) +If you already have an existing Next.js project, that’s fine too. Just skip this step and proceed with the next step. + +For the sake of this guide, let’s start with a new Next.js project called `tiptap-example`. The following command sets up everything we need to get started. +```bash +# create a project +npx create-next-app tiptap-example + +# change directory +cd tiptap-example +``` + +## 2. Install the dependencies +Now that we have a standard boilerplate set up we can get started on getting tiptap up and running! For this we will need to install two packages: `@tiptap/react` and `@tipta/starter-kit` which includes all the extensions you need to get started quickly. + +```bash +# install with npm +npm install @tiptap/react @tiptap/starter-kit + +# install with Yarn +yarn add @tiptap/react @tiptap/starter-kit +``` + +If you followed step 1 and 2, you can now start your project with `npm run dev` or `yarn dev`, and open [http://localhost:3000/](http://localhost:3000/) in your favorite browser. This might be different, if you’re working with an existing project. + +## 3. Create a new component +To actually start using tiptap, you’ll need to add a new component to your app. To do this, first create a directory called `components/`. Now it's time to create our component which we'll call `Tiptap`. To do this put the following example code in `components/Tiptap.js`. + +```jsx +import { useEditor, EditorContent } from '@tiptap/react' +import StarterKit from '@tiptap/starter-kit' + +const Tiptap = () => { + const editor = useEditor({ + extensions: [ + StarterKit, + ], + content: '

Hello World! 🌎️

', + }) + + return ( + + ) +} + +export default Tiptap; +``` + +## 4. Add it to your app +Now, let’s replace the content of `pages/index.js` with the following example code to use our new `Tiptap` component in our app. + +```jsx +import Tiptap from '../components/Tiptap' + +export default function Home() { + return ( + + ) +} +``` +You should now see tiptap in your browser. Time to give yourself a pat on the back! :) \ No newline at end of file diff --git a/docs/installation/react.md b/docs/installation/react.md index a13eb896..42f1f661 100644 --- a/docs/installation/react.md +++ b/docs/installation/react.md @@ -12,6 +12,14 @@ The following guide describes how to integrate tiptap with your [React](https:// * [Node](https://nodejs.org/en/download/) installed on your machine * Experience with [React](https://reactjs.org/docs/getting-started.html) +## Using a template +If you just want to get up and running with tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below alreay completed. + +```bash +# create a project based on the tiptap template +npx create-react-app tiptap-example --template tiptap +``` + ## 1. Create a project (optional) If you already have an existing React project, that’s fine too. Just skip this step and proceed with the next step. From d70ba4e380d63ed5cbb8e500521b11a61de1abfb Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 7 Oct 2021 13:17:21 +0200 Subject: [PATCH 14/16] Update links.yaml --- docs/links.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/links.yaml b/docs/links.yaml index 135ce6a0..e667bc4d 100644 --- a/docs/links.yaml +++ b/docs/links.yaml @@ -21,6 +21,9 @@ - title: React link: /installation/react skip: true + - title: Next.js + link: /installation/nextjs + skip: true - title: Vue 3 link: /installation/vue3 skip: true From 5695d79c27c3f1fb696be1fb80b312e56d7841b0 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 7 Oct 2021 14:48:09 +0200 Subject: [PATCH 15/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9575c81..49896d4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# tiptap 2 +# tiptap A headless, framework-agnostic and extendable rich text editor, based on [ProseMirror](https://github.com/ProseMirror/prosemirror). [![Build Status](https://github.com/ueberdosis/tiptap/workflows/build/badge.svg)](https://github.com/ueberdosis/tiptap/actions) From 8b82fbee80ea56fc68e379768f21d33fcc6dfaae Mon Sep 17 00:00:00 2001 From: Aron Buzinkay <25285064+alb@users.noreply.github.com> Date: Thu, 7 Oct 2021 14:49:40 +0200 Subject: [PATCH 16/16] Fixed typo in React installation guide (#1989) --- docs/installation/react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/react.md b/docs/installation/react.md index 42f1f661..e4a26e51 100644 --- a/docs/installation/react.md +++ b/docs/installation/react.md @@ -13,7 +13,7 @@ The following guide describes how to integrate tiptap with your [React](https:// * Experience with [React](https://reactjs.org/docs/getting-started.html) ## Using a template -If you just want to get up and running with tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below alreay completed. +If you just want to get up and running with tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below already completed. ```bash # create a project based on the tiptap template