mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-25 04:19:02 +08:00
2.2 KiB
2.2 KiB
description | icon |
---|---|
All the popular extensions in a single extension. Doesn’t get much better than this. | stack-line |
StarterKit
The StarterKit
is a collection of the most popular Tiptap extensions. If you’re just getting started, this extension is for you.
Installation
# with npm
npm install @tiptap/starter-kit
# with Yarn
yarn add @tiptap/starter-kit
Included extensions
Nodes
Blockquote
BulletList
CodeBlock
Document
HardBreak
Heading
HorizontalRule
ListItem
OrderedList
Paragraph
Text
Marks
Extensions
Source code
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],
},
}),
],
})