Skip to main content
The Text extension represents inline text content. It’s the most fundamental inline node and is required for any editor that displays text.

Installation

npm install @tiptap/extension-text

Usage

The Text extension is included in the StarterKit by default:
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  extensions: [StarterKit],
})
To use it standalone:
import { Editor } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'

const editor = new Editor({
  extensions: [
    Document,
    Paragraph,
    Text,
  ],
})

Configuration

The Text extension has no configuration options. It’s automatically used within block-level nodes that accept inline content.

Schema

The Text node has the following properties:
  • Name: text
  • Group: inline
  • Content: Plain text content

Source Code

View the source code on GitHub: packages/extension-text/src/text.ts

Build docs developers (and LLMs) love