apps/mantine.dev/src/pages/guides/tiptap-3-migration.mdx
import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.Tiptap3Migration);
This guide will help you update TipTap from version 2 to version 3.
Set shouldRerenderOnTransaction: true in useEditor. It is required to have active control
highlight.
const editor = useEditor({
shouldRerenderOnTransaction: true,
// ... other options
});
Set immediatelyRender: false if you use Next.js or other framework with server-side rendering.
It is required to prevent hydration mismatches.
const editor = useEditor({
immediatelyRender: false,
// ... other options
});
StarterKit now includes underline and link extensions out of the box:
// With tiptap 2.x – ❌ no longer works with tiptap 3.x
import Underline from '@tiptap/extension-underline';
import StarterKit from '@tiptap/starter-kit';
import { Link } from '@mantine/tiptap';
const editor = useEditor({
extensions: [StarterKit, Underline, Link],
});
// With tiptap 3x – ✅ new usage example
import StarterKit from '@tiptap/starter-kit';
import { Link } from '@mantine/tiptap';
const editor = useEditor({
// Remove underline and link extensions
extensions: [StarterKit.configure({ link: false }), Link],
});
Change import paths for floating and bubble menu components:
// With tiptap 2.x – ❌ no longer works with tiptap 3.x
import { BubbleMenu, FloatingMenu } from '@tiptap/react';
// With tiptap 3.x – ✅ new usage example
import { BubbleMenu, FloatingMenu } from '@tiptap/react/menus';