Skip to content

Upgrading @tiptap/pm 2 to 3

Breaking2.27.3 → 3.35.1Breaking29Security17Platform3New157Changed259Fixed380Other63

BreakingUpgrade verdict

24 breaking changes and 3 platform requirement changes and 17 security fixes.

  • Collaborative documents no longer store position migration entries, so saved relative positions do not follow content that structural edits replace or move.
  • Setting or clearing content now triggers update events by default, which may affect listeners.
  • The History extension now has a new name, so code referring to the old name must be updated.
  • Updates the `setContent` command signature for better defaults.
Top 5 of 44 that need code or config changes
Breaking24
Remove persistent position migrations to stop structural edits and undo or redo from adding migration history to collaborative documents.
clearContent and setContent now emit updates by default.
clearContentsetContent
Renames the History extension to UndoRedo.
HistoryUndoRedo
Updates the setContent command signature for better defaults.
setContent
Changes prop types of the Tiptap component so that either the editor or the instance field is required.
Tiptapeditorinstance
extendMarkRange now defaults to the first mark's attributes of the given type, so extendMarkRange('link') no longer spans adjacent links with different hrefs.
extendMarkRange
Moves BubbleMenu and FloatingMenu to a separate @tiptap/react/menus entrypoint to keep floating-ui optional.
BubbleMenuFloatingMenu@tiptap/react/menus
Switches @tiptap/core bundling to tsup, dropping UMD builds.
getPos now returns number | undefined to reflect runtime reality.
getPos
Node, Mark, and Extension configs no longer allow arbitrary keys unless their TypeScript interfaces are extended.
NodeMarkExtension
editor.storage becomes per-editor instance and strongly typed.
editor.storage
Replaces Tippy.js with Floating UI across menu-related extensions, removing tippyOptions in favor of an options prop and requiring @floating-ui/dom@^1.6.0.
FloatingMenuBubbleMenuMentionSuggestiontippyOptionsoptions@floating-ui/dom
Tippy.js replacement is a breaking change requiring manual migration.
Switches to tsup for bundling, so UMD builds are no longer supported.
tsup
Renames the CollaborationCursor extension to CollaborationCaret.
CollaborationCursorCollaborationCaret
Points the old extension-history extension to @tiptap/extensions, where the history extension is now exported as UndoRedo.
extension-history@tiptap/extensionsUndoRedo
Renames @tiptap/extension-collaboration-cursor to @tiptap/extension-collaboration-caret.
@tiptap/extension-collaboration-cursor@tiptap/extension-collaboration-caret
Removes tippy.js and replaces it with Floating UI for floating elements.
tippy.jsFloating UI
Updates the default class names of the invisible and mathematics plugins.
Changes math node insertion so that without a LaTeX string, the current text selection is used and replaced.
The Math extension now renders math content using nodes instead of text content, requiring code updates to the new node-based API.
Requires an explicit update command to change a math equation's latex content with the new node-based approach.
editor.commands.updateInlineMath()editor.commands.updateBlockMath()
Removes the recently added updateBubbleMenuPosition method because it only worked in the vanilla BubbleMenu extension.
updateBubbleMenuPositiontransactionHandlerBubbleMenuView
VueNodeViewRenderer returns null for contentDOM when the node is not a leaf and no NodeViewContent is rendered.
VueNodeViewRenderercontentDOMNodeViewContent
Security17
Fixes unsafe HTML parsing in the RubyText extension.
RubyText
Prevents extra CSS declarations from being rendered from editor content.
Prevents extra CSS declarations from being rendered from editor content.
Prevents extra CSS declarations from being rendered from editor content in the collaboration caret extension.
Prevents extra CSS declarations from being rendered from editor content in the highlight extension.
Prevents extra CSS declarations from being rendered from editor content in the text align extension.
Prevents extra CSS declarations from being rendered from editor content in the text style extension.
Ignores potentially unsafe color values received from other collaboration clients.
Bumps prosemirror-view to ^1.42.3, fixing an XSS vulnerability where pasting crafted HTML could run arbitrary JavaScript.
prosemirror-view
Fixes a denial-of-service risk where crafted block or inline Markdown attributes could consume excessive CPU and block the event loop.
Prevents untrusted HTML attributes from changing an object's prototype when merged with mergeAttributes.
mergeAttributes
Fixes isAllowedUri accepting unknown protocols whose name contains a hyphen, such as unknown-protocol://test.
isAllowedUri
Escapes HTML string renderer text content and attribute values to prevent injected markup from untrusted content.
Fixes CVE-2025-62410 by updating happy-dom to ^20.0.2.
happy-dom
Bumps happy-dom from ^18.0.1 to ^20.0.0 in @tiptap/html to address CVE-2025-61927.
happy-dom@tiptap/html
Bumps linkifyjs to the latest version to address a recently discovered prototype pollution vulnerability.
linkifyjs
Fixes Link extension commands not respecting XSS prevention via unallowed protocols.
Platform3
Requires installing @floating-ui/dom@^1.6.0 as a peer dependency.
@floating-ui/dom
Declares @types/react as an optional peer dependency so React types resolve under pnpm's global virtual store.
@types/react
Adds @tiptap/pm as a peer dependency of @tiptap/extension-blockquote so bundlers resolve ProseMirror packages from the app.
@tiptap/pmprosemirror-model@tiptap/extension-blockquote