tiptap/docs/api/nodes/paragraph.md
2021-11-09 11:56:27 +01:00

1.5 KiB
Raw Blame History

description icon
Mom, look! I wrote a paragraph on the Internet. paragraph

Paragraph

Version Downloads

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

:::warning Breaking Change from 1.x → 2.x tiptap 1 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). :::

Installation

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

Command Windows/Linux macOS
setParagraph() Control Alt 0 Cmd Alt 0

Source code

packages/extension-paragraph/

Usage

https://embed.tiptap.dev/preview/Nodes/Paragraph