docs: use regular case for Tiptap

This commit is contained in:
Hans Pagel
2021-10-19 22:30:45 +02:00
parent 3fe97621e7
commit f45c8d0ca7
77 changed files with 203 additions and 203 deletions

View File

@@ -5,7 +5,7 @@ tableOfContents: true
# Upgrade Guide
## Introduction
First of all, tiptap v1 isnt supported anymore and wont receive any further updates.
First of all, Tiptap v1 isnt supported anymore and wont receive any further updates.
Yes, its tedious work to upgrade your favorite text editor to a new API, but we made sure youve got enough reasons to upgrade to the newest version.
@@ -17,22 +17,22 @@ Yes, its tedious work to upgrade your favorite text editor to a new API, but
The new API will look pretty familiar to you, but there are a ton of changes though. To make the upgrade a little bit easier, here is everything you need to know:
## Uninstall tiptap v1
The whole package structure has changed, we even moved to another npm namespace, so youll need to remove the old version entirely before upgrading to tiptap 2.
## Uninstall Tiptap v1
The whole package structure has changed, we even moved to another npm namespace, so youll need to remove the old version entirely before upgrading to Tiptap 2.
Otherwise youll run into an exception, for example “looks like multiple versions of prosemirror-model were loaded”.
```bash
# with npm
npm uninstall tiptap tiptap-commands tiptap-extensions tiptap-utils
npm uninstall Tiptap Tiptap-commands Tiptap-extensions Tiptap-utils
# with Yarn
yarn remove tiptap tiptap-commands tiptap-extensions tiptap-utils
yarn remove Tiptap Tiptap-commands Tiptap-extensions Tiptap-utils
```
## Install tiptap v2
## Install Tiptap v2
Once you have uninstalled the old version of tiptap, install the new Vue 2 package and the starter kit:
Once you have uninstalled the old version of Tiptap, install the new Vue 2 package and the starter kit:
```bash
# install with npm
@@ -42,8 +42,8 @@ npm install @tiptap/vue-2 @tiptap/starter-kit
yarn add @tiptap/vue-2 @tiptap/starter-kit
```
## Keep tiptap v2 up to date
We are constantly releasing updates to tiptap. Did you know theres an easy-to-use command to update your dependencies with Yarn?
## Keep Tiptap v2 up to date
We are constantly releasing updates to Tiptap. Did you know theres an easy-to-use command to update your dependencies with Yarn?
```bash
yarn upgrade-interactive
@@ -171,12 +171,12 @@ Most commands can be combined to one call now. Thats shorter than separate fu
editor.chain().toggleBold().focus().run()
```
The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Read more about [the new tiptap commands](/api/commands) in our API documentation.
The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Read more about [the new Tiptap commands](/api/commands) in our API documentation.
## .focus() isnt called on every command anymore
We tried to hide the `.focus()` command from you with tiptap 1 and executed that on every command. That led to issues in specific use cases, where you want to run a command, but dont want to focus the editor.
We tried to hide the `.focus()` command from you with Tiptap 1 and executed that on every command. That led to issues in specific use cases, where you want to run a command, but dont want to focus the editor.
With tiptap v2 you have to explicitly call the `focus()` and you probably want to do that in a lot of places. Here is an example:
With Tiptap v2 you have to explicitly call the `focus()` and you probably want to do that in a lot of places. Here is an example:
```js
editor.chain().focus().toggleBold().run()
@@ -186,14 +186,14 @@ editor.chain().focus().toggleBold().run()
The new event callbacks have fewer parameters. The same things should be available through `this.` now. [Read more about events here.](/api/events)
## Collaborative editing
The reference implementation for collaborative editing uses Y.js now. Thats a whole different thing. You still can use the tiptap 1 extension, but its up to you to adapt it to the new extension API. If youve done this, dont forget to share it with us so we can link to it from here!
The reference implementation for collaborative editing uses Y.js now. Thats a whole different thing. You still can use the Tiptap 1 extension, but its up to you to adapt it to the new extension API. If youve done this, dont forget to share it with us so we can link to it from here!
Read more about [the new collaborative editing experience](/guide/collaborative-editing) in our guide.
## Marks dont support node view anymore
For marks, node views are [not well supported in ProseMirror](https://discuss.prosemirror.net/t/there-is-a-bug-in-marks-nodeview/2722/2). There is also [a related issue](https://github.com/ueberdosis/tiptap/issues/613) for tiptap 1. Thats why we removed it in tiptap 2.
For marks, node views are [not well supported in ProseMirror](https://discuss.prosemirror.net/t/there-is-a-bug-in-marks-nodeview/2722/2). There is also [a related issue](https://github.com/ueberdosis/tiptap/issues/613) for Tiptap 1. Thats why we removed it in Tiptap 2.
## Become a sponsor
tiptap wouldnt exist without the funding of its community. If you fell in love with tiptap, dont forget to [become a sponsor](/sponsor) and make the maintenance, development and support sustainable.
tiptap wouldnt exist without the funding of its community. If you fell in love with Tiptap, dont forget to [become a sponsor](/sponsor) and make the maintenance, development and support sustainable.
In exchange, well take you into our hearts, invite you to private repositories, add a `sponsor ♥` label to your issues and pull requests and more.