Files
tiptap/docs/src/docPages/guide/configuration.md
2020-09-27 10:29:01 +02:00

825 B

Configuration

tiptap is all about customization. There are a ton of options to configure the behavior and functionality of the editor. Most of those settings can be set before creating the Editor. Give tiptap a JSON with all the settings you would like to overwrite.

Table of Contents

Overwrite the default settings

See an example with autoFocus: true here:

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

new Editor({
  element: document.getElementsByClassName('element'),
  extensions: defaultExtensions(),
  content: '<p>Hey there!</p>',
  autoFocus: true,
})

This will set the focus to tiptap after the editor is initialized. Of course, there are way more options available.

Check out the API documentation to see all available options.