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.
In plain terms
- 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.
Must act Top 5 of 44 that need code or config changes
What you must change
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.
clearContentsetContentRenames the History extension to UndoRedo.
HistoryUndoRedoUpdates the
setContent command signature for better defaults.setContentChanges prop types of the Tiptap component so that either the
editor or the instance field is required.TiptapeditorinstanceextendMarkRange now defaults to the first mark's attributes of the given type, so extendMarkRange('link') no longer spans adjacent links with different hrefs.
extendMarkRangeMoves BubbleMenu and FloatingMenu to a separate
@tiptap/react/menus entrypoint to keep floating-ui optional.BubbleMenuFloatingMenu@tiptap/react/menusSwitches @tiptap/core bundling to tsup, dropping UMD builds.
getPos now returns number | undefined to reflect runtime reality.
getPosNode, Mark, and Extension configs no longer allow arbitrary keys unless their TypeScript interfaces are extended.
NodeMarkExtensioneditor.storage becomes per-editor instance and strongly typed.
editor.storageReplaces 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/domTippy.js replacement is a breaking change requiring manual migration.
Switches to tsup for bundling, so UMD builds are no longer supported.
tsupRenames the CollaborationCursor extension to CollaborationCaret.
CollaborationCursorCollaborationCaretPoints the old extension-history extension to @tiptap/extensions, where the history extension is now exported as UndoRedo.
extension-history@tiptap/extensionsUndoRedoRenames @tiptap/extension-collaboration-cursor to @tiptap/extension-collaboration-caret.
@tiptap/extension-collaboration-cursor@tiptap/extension-collaboration-caretRemoves tippy.js and replaces it with Floating UI for floating elements.
tippy.jsFloating UIUpdates 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.
updateBubbleMenuPositiontransactionHandlerBubbleMenuViewVueNodeViewRenderer returns null for contentDOM when the node is not a leaf and no NodeViewContent is rendered.
VueNodeViewRenderercontentDOMNodeViewContentSecurity17
Fixes unsafe HTML parsing in the RubyText extension.
RubyTextPrevents 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-viewFixes 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.
mergeAttributesFixes
isAllowedUri accepting unknown protocols whose name contains a hyphen, such as unknown-protocol://test.isAllowedUriEscapes 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-domBumps happy-dom from ^18.0.1 to ^20.0.0 in @tiptap/html to address CVE-2025-61927.
happy-dom@tiptap/htmlBumps linkifyjs to the latest version to address a recently discovered prototype pollution vulnerability.
linkifyjsFixes 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/domDeclares @types/react as an optional peer dependency so React types resolve under pnpm's global virtual store.
@types/reactAdds @tiptap/pm as a peer dependency of @tiptap/extension-blockquote so bundlers resolve ProseMirror packages from the app.
@tiptap/pmprosemirror-model@tiptap/extension-blockquote