New @tiptap/pm ProseMirror package & upgrade guide for beta.210

Published February 2nd, 2023 by @bdbch

With Tiptap version 2.0.0-beta.210 we provide a new package which you can install via npm install @tiptap/pm. This package provides all important ProseMirror packages like prosemirror-state, prosemirror-view or prosemirror-model and makes sure that you always have the same version of ProseMirror in your project. This way, we can make sure that Tiptap and all extensions are compatible with each other. Another plus is that you don't need to install all ProseMirror packages manually anymore if you are not using npm or any other package manager which supports automatic peer dependency resolution.

What to do now?

If you didn't upgrade your Tiptap version to 2.0.0-beta.205 yet, you can simply upgrade to 2.0.0-beta.210 and install @tiptap/pm via npm install @tiptap/pm to install all dependencies. Make sure to clean your package directory from leftover ProseMirror packages.

If you did upgrade your Tiptap version to 2.0.0-beta.205 or higher already, you need to remove all ProseMirror packages from your project and install @tiptap/pm via npm install @tiptap/pm to install all ProseMirror dependencies back via the new meta package.

If you are a new user, just follow our installation guides - they are up to date and include the new package.

Accessing ProseMirror in your project

If you want to access ProseMirror libraries in your project, you can simply import them from @tiptap/pm. For example you could import the EditorState class from prosemirror-state like this:

// this imports directly from the 'prosemirror-state' managed via the @tiptap/pm package
import { EditorState } from '@tiptap/pm/state'

What ProseMirror packages are included?

The new package includes the following ProseMirror packages:

  • @tiptap/pm/changeset
  • @tiptap/pm/collab
  • @tiptap/pm/commands
  • @tiptap/pm/dropcursor
  • @tiptap/pm/gapcursor
  • @tiptap/pm/history
  • @tiptap/pm/inputrules
  • @tiptap/pm/keymap
  • @tiptap/pm/markdown
  • @tiptap/pm/menu
  • @tiptap/pm/model
  • @tiptap/pm/schema-basic
  • @tiptap/pm/schema-list
  • @tiptap/pm/state
  • @tiptap/pm/tables
  • @tiptap/pm/trailing-node
  • @tiptap/pm/transform
  • @tiptap/pm/view

You can find out more about those libraries in the ProseMirror documentation.

Your thoughts?

We're looking forward to hear your thoughts about this new package. If you have any questions or want to bring in your voice, feel free to join our Discord.

Like what you’re reading?

Subscribe via RSS to receive new posts in the feed reader of your choice.