Skip to content

Commit

Permalink
Update installation guides (ueberdosis#3698)
Browse files Browse the repository at this point in the history
* docs: update installation guides

* docs: remove base setup

* docs: complete the prosemirror package documentation
  • Loading branch information
svenadlung authored and aliasliao committed May 24, 2023
1 parent b1f556d commit 04f364a
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/guide/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To render the saved content, set the editor to read-only. That’s how you can a
https://embed.tiptap.dev/preview/GuideContent/ReadOnly

### Option 2: Generate HTML from ProseMirror JSON
If you need to render the content on the server side, for example to generate the HTML for a blog post which has been written in Tiptap, you’ll probably want to do just that without an actual editor instance.
If you need to render the content on the server side, for example to generate the HTML for a blog post, which has been written in Tiptap, you’ll probably want to do just that without an actual editor instance.

That’s what the `generateHTML()` is for. It’s a helper function which renders HTML without an actual editor instance.

Expand Down
6 changes: 5 additions & 1 deletion docs/guide/prosemirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ tableOfContents: true

# Accessing ProseMirror internals

The ProseMirror internals are packaged in the `@tiptap/pm` package that you need to install with `npm install @tiptap/pm`. If you already have this done you can skip the following step.
Tiptap is built on top of ProseMirror, which has a pretty powerful API. To access it, we provide the package `@tiptap/pm`. This package provides all important ProseMirror packages like `prosemirror-state`, `prosemirror-view` or `prosemirror-model`. Using the package for custom development makes sure that you always have the same version of ProseMirror which is used by Tiptap as well. This way, we can make sure that Tiptap and all extensions are compatible with each other and prevent version clashes. Another plus is that you don't need to install all ProseMirror packages manually, especially if you are not using npm or any other package manager that supports automatic peer dependency resolution.

Installation:

```bash
npm i @tiptap/pm
Expand Down Expand Up @@ -37,3 +39,5 @@ The following packages are available:
- `@tiptap/pm/trailing-node`
- `@tiptap/pm/transform`
- `@tiptap/pm/view`

You can find out more about those libraries in the [ProseMirror documentation](https://prosemirror.net/docs/ref).
10 changes: 0 additions & 10 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ tableOfContents: true

Tiptap is framework-agnostic and even works with Vanilla JavaScript (if that’s your thing). The following integration guides help you integrating Tiptap in your JavaScript project.

## Base Setup

To get started you will need to install `@tiptap/core`, `@tiptap/pm` and `@tiptap/starter-kit` in your project like this:

```bash
npm install @tiptap/core @tiptap/pm @tiptap/starter-kit
```

After that, you can start using Tiptap in your project. To integrate it into your framework, please follow the guides below.

## Integration guides

- [Vanilla JavaScript](/installation/vanilla-javascript)
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm run dev

## 2. Install the dependencies

Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need `alpinejs`, the `@tiptap/core` package, the `@tiptap/pm` package and the `@tiptap/starter-kit` which has the most common extensions to get started quickly.
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need `alpinejs`, the `@tiptap/core` package, the `@tiptap/pm` package and the `@tiptap/starter-kit`, which includes the most common extensions to get started quickly.

```bash
npm install alpinejs @tiptap/core @tiptap/pm @tiptap/starter-kit
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cd my-tiptap-project
```

#### 2. Install the dependencies
Time to install the `@tiptap/react` package and our [`StarterKit`](/api/extensions/starter-kit), which has the most popular extensions to get started quickly.
Time to install the `@tiptap/react` package, `@tiptap/pm` (the ProseMirror library) and `@tiptap/starter-kit`, which includes the most popular extensions to get started quickly.

```bash
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm run dev
```

## 2. Install the dependencies
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/core` package, with a few components, `@tiptap/pm` and `@tiptap/starter-kit` which has the most common extensions to get started quickly.
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/core` package, with a few components, `@tiptap/pm` and `@tiptap/starter-kit`, which includes the most common extensions to get started quickly.

```bash
npm install @tiptap/core @tiptap/pm @tiptap/starter-kit
Expand Down
4 changes: 1 addition & 3 deletions docs/installation/vanilla-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ tableOfContents: true
You are using plain JavaScript or a framework that is not listed here? No worries, we provide everything you need.

## 1. Install the dependencies
For the following example you will need `@tiptap/core` (the actual editor), `@tiptap/pm` (the ProseMirror library) and `@tiptap/starter-kit`.

The StarterKit doesn’t include all, but the most common extensions.
For the following example you will need `@tiptap/core` (the actual editor), `@tiptap/pm` (the ProseMirror library) and `@tiptap/starter-kit`. The StarterKit doesn’t include all, but the most common extensions.

```bash
npm install @tiptap/core @tiptap/pm @tiptap/starter-kit
Expand Down
4 changes: 2 additions & 2 deletions docs/installation/vue2.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ cd my-tiptap-project
```

## 2. Install the dependencies
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/vue-2` package, with a few components, and `@tiptap/starter-kit` which has the most common extensions to get started quickly.
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/vue-2` package, `@tiptap/pm` (the ProseMirror library) and `@tiptap/starter-kit`, which includes the most common extensions to get started quickly.

```bash
npm install @tiptap/vue-2 @tiptap/starter-kit
npm install @tiptap/vue-2 @tiptap/pm @tiptap/starter-kit
```

If you followed step 1 and 2, you can now start your project with `npm run dev`, and open [http://localhost:8080](http://localhost:8080) in your favorite browser. This might be different, if you’re working with an existing project.
Expand Down
4 changes: 2 additions & 2 deletions docs/installation/vue3.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ cd my-tiptap-project
```

## 2. Install the dependencies
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/vue-3` package, with a few components, and `@tiptap/starter-kit` which has the most common extensions to get started quickly.
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/vue-3` package, `@tiptap/pm` (the ProseMirror library) and `@tiptap/starter-kit`, which includes the most common extensions to get started quickly.

```bash
npm install @tiptap/vue-3 @tiptap/starter-kit
npm install @tiptap/vue-3 @tiptap/pm @tiptap/starter-kit
```

If you followed step 1 and 2, you can now start your project with `npm run serve`, and open [http://localhost:8080](http://localhost:8080) in your favorite browser. This might be different, if you’re working with an existing project.
Expand Down
2 changes: 1 addition & 1 deletion docs/links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
items:
- title: Configuration
link: /guide/configuration
- title: ProseMirror
- title: ProseMirror API
link: /guide/prosemirror
- title: Menus
link: /guide/menus
Expand Down
4 changes: 2 additions & 2 deletions docs/overview/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ npm uninstall tiptap tiptap-commands tiptap-extensions tiptap-utils

## 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, the ProseMirror library and the starter kit:

```bash
npm install @tiptap/vue-2 @tiptap/starter-kit
npm install @tiptap/vue-2 @tiptap/pm @tiptap/starter-kit
```

## Keep Tiptap v2 up to date
Expand Down

0 comments on commit 04f364a

Please sign in to comment.