tiptap/docs/api/extensions/starter-kit.md
2022-12-23 00:00:57 +01:00

2.4 KiB
Raw Blame History

description icon
All the popular extensions in a single extension. Doesnt get much better than this. stack-line

StarterKit

Version Downloads

The StarterKit is a collection of the most popular Tiptap extensions. If youre just getting started, this extension is for you.

Installation

npm install @tiptap/starter-kit

:::warning Are you using Yarn, pNPM, npm 6 or less? Unfortunately your package manager does not install peer dependencies automatically and you have to install them by your own. Please see here which packages are needed and how to install them. :::

Included extensions

Nodes

Marks

Extensions

Source code

packages/starter-kit/

Usage

Pass StarterKit to the editor to load all included extension at once.

import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  content: '<p>Example Text</p>',
  extensions: [
    StarterKit,
  ],
})

You can configure the included extensions, or even disable a few of them, like shown below.

import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  content: '<p>Example Text</p>',
  extensions: [
    StarterKit.configure({
      // Disable an included extension
      history: false,

      // Configure an included extension
      heading: {
        levels: [1, 2],
      },
    }),
  ],
})