Tiptap Editor 3.0 Beta is out. Start here

Migrate from TinyMCE to Tiptap

Editor

Tiptap is a powerful alternative to TinyMCE. Migrating from TinyMCE to Tiptap is straightforward. This guide will walk you through the migration process step by step.

Content migration

HTML content compatibility

TinyMCE typically stores content as HTML, which makes migration to Tiptap seamless. Tiptap can directly use HTML content without any conversion:

// Your existing TinyMCE content
const existingContent = '<p>Hello <strong>world</strong>!</p>'

// Use directly in Tiptap
const editor = new Editor({
  content: existingContent,
  extensions: [StarterKit],
})

While HTML works perfectly, we recommend converting it to Tiptap's JSON format for better performance and readability. For batch conversion of existing content, use the HTML utility to convert HTML to JSON programmatically.

Editor setup

Installation

First, install Tiptap and its dependencies:

npm install @tiptap/core @tiptap/starter-kit

Tiptap supports all modern frontend UI frameworks like React and Vue. Follow the framework-specific installation instructions in our installation guides.

Basic editor setup

Replace your TinyMCE initialization with Tiptap:

// TinyMCE (before)
tinymce.init({
  selector: '#editor',
  plugins: 'lists link image table code',
  toolbar: 'undo redo | bold italic | bullist numlist | link image',
})

// Tiptap (after)
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  element: document.querySelector('#editor'),
  extensions: [StarterKit],
  content: '<p>Hello World!</p>',
})

Extensions

Understanding Tiptap's extension system

Tiptap uses a modular extension system that resembles TinyMCE's plugin architecture. Each feature is an extension that can be configured independently.

The StarterKit is a bundle of all the basic extensions, and you can add or remove other extensions as needed.

Explore all available extensions in our extensions guide, or create your own to support custom functionality and HTML elements.

Common TinyMCE plugin equivalents

TinyMCE PluginTiptap ExtensionNotes
listsBulletList, OrderedList, ListItemIncluded in StarterKit
linkLinkIncluded in StarterKit
imageImageAvailable separately
tableTableAvailable separately
codeCode, CodeBlockIncluded in StarterKit
textcolorTextStyle, ColorAvailable separately
fontsizeTextStyle, FontSizeAvailable separately
alignTextAlignAvailable separately

Extension configuration

import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'
import Image from '@tiptap/extension-image'
import Table from '@tiptap/extension-table'
import TableRow from '@tiptap/extension-table-row'
import TableHeader from '@tiptap/extension-table-header'
import TableCell from '@tiptap/extension-table-cell'

const editor = new Editor({
  extensions: [
    StarterKit,
    // Add and configure extensions
    Image.configure({
      inline: true,
      allowBase64: true,
    }),
    Table.configure({
      resizable: true,
    }),
    TableRow,
    TableHeader,
    TableCell,
  ],
})

Custom extensions

For TinyMCE custom plugins, you can create custom Tiptap extensions. See our custom extensions guide for detailed instructions.

UI implementation

Toolbar implementation

TinyMCE's toolbar configuration translates to custom UI components in Tiptap:

// TinyMCE toolbar config
toolbar: 'undo redo | bold italic | bullist numlist'

// Tiptap equivalent (React example)
function Toolbar({ editor }) {
  if (!editor) return null

  return (
    <div className="toolbar">
      <button onClick={() => editor.chain().focus().undo().run()} disabled={!editor.can().undo()}>
        Undo
      </button>
      <button onClick={() => editor.chain().focus().redo().run()} disabled={!editor.can().redo()}>
        Redo
      </button>
      <button
        onClick={() => editor.chain().focus().toggleBold().run()}
        className={editor.isActive('bold') ? 'active' : ''}
      >
        Bold
      </button>
      <button
        onClick={() => editor.chain().focus().toggleItalic().run()}
        className={editor.isActive('italic') ? 'active' : ''}
      >
        Italic
      </button>
    </div>
  )
}

Pre-built UI components

For faster development, consider using Tiptap's pre-built UI components:

TinyMCE's context menus can be replaced with Tiptap's BubbleMenu and FloatingMenu:

import { BubbleMenu } from '@tiptap/react'

function MyEditor() {
  const editor = useEditor({
    extensions: [StarterKit],
  })

  return (
    <>
      <EditorContent editor={editor} />
      <BubbleMenu editor={editor}>
        <button
          onClick={() => editor.chain().focus().toggleBold().run()}
          className={editor.isActive('bold') ? 'active' : ''}
        >
          Bold
        </button>
        <button
          onClick={() => editor.chain().focus().toggleItalic().run()}
          className={editor.isActive('italic') ? 'active' : ''}
        >
          Italic
        </button>
      </BubbleMenu>
    </>
  )
}

Migration checklist

Next steps