Skip to main content

Quickstart

Get up and running with Tiptap in just a few minutes. This guide will walk you through creating a basic editor with common formatting options.
Make sure you’ve installed Tiptap before following this guide.

Basic Setup

Let’s create a simple editor with the starter kit. Choose your framework below:

Create the Editor

Here’s a minimal React example using Tiptap:

What’s Happening?

1

Import the necessary packages

  • useEditor - A React hook to create and manage the editor instance
  • EditorContent - A React component that renders the editor
  • StarterKit - A bundle of essential extensions
2

Initialize the editor with useEditor

The useEditor hook takes a configuration object with:
  • extensions - Array of extensions to enable
  • content - Initial HTML content for the editor
3

Render the editor

The EditorContent component takes the editor instance and renders the editing interface

Complete Example with Toolbar

Here’s a more complete example with a formatting toolbar (from demos/src/Examples/Default/React/index.tsx):

Cleanup

Always destroy the editor when the component unmounts to prevent memory leaks. The useEditor hook handles this automatically.

Understanding Commands

Tiptap uses a chainable command API to modify the editor content:

Common Commands

Explore all available commands in the Commands documentation.

Checking Active States

Use isActive() to check if a formatting option is currently active:

Getting and Setting Content

Get Content

Set Content

Styling the Editor

Tiptap doesn’t include default styles. Add your own CSS to style the editor:

Next Steps

Now that you have a working editor, explore more features:

Add More Extensions

Browse and add more extensions like images, tables, and mentions

Create Custom Extensions

Learn how to build your own custom extensions

Add Collaboration

Enable real-time collaborative editing with Yjs

Explore Examples

See Tiptap in action with interactive examples
Need help? Join the Discord community or check out GitHub Discussions.