Paragraph extension

VersionDownloads

Yes, the schema is very strict. Without this extension you won’t even be able to use paragraphs in the editor.

Breaking Change

Tiptap v1 tried to hide that node from you, but it has always been there. You have to explicitly import it from now on (or use StarterKit).

Install

npm install @tiptap/extension-paragraph

Settings

HTMLAttributes

Custom HTML attributes that should be added to the rendered HTML tag.

Paragraph.configure({
  HTMLAttributes: {
    class: 'my-custom-class',
  },
})

Commands

setParagraph()

Transforms all selected nodes to paragraphs.

editor.commands.setParagraph()

Keyboard shortcuts

CommandWindows/LinuxmacOS
setParagraph()Control + Alt + 0Cmd + Alt + 0

Source code

packages/extension-paragraph/