Skip to main content
Tiptap provides native Vue 3 support with composables and components that work seamlessly with the Composition API.

Installation

1

Install the packages

Install the Vue 3 package along with the core package and any extensions you need:
2

Import and use

Import the necessary components and composables in your Vue component:

Core Concepts

useEditor Composable

The useEditor composable is the primary way to create and manage an editor instance in Vue 3. It returns a shallow ref containing the editor instance.

Type Signature

Basic Usage with Composition API

Options API Usage

You can also use the Editor class directly with the Options API:

EditorContent Component

The EditorContent component renders the actual editor interface.

Usage Example

Complete Working Examples

Event Handlers

Handle editor events through the editor options:

Reactivity

The editor instance is a shallow ref, so you need to use .value when accessing it in script:

Advanced: Custom Node Views

Create Vue components as custom node views:
Bubble and floating menus work seamlessly with Vue 3:

TypeScript Support

Tiptap has full TypeScript support:

Provide/Inject Pattern

Share the editor instance across components using Vue’s provide/inject:

Next Steps

Extensions

Explore available extensions to enhance your editor

Commands

Learn about editor commands and chains

Styling

Customize the editor’s appearance

Node Views

Create interactive custom nodes with Vue components