> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ueberdosis/tiptap/llms.txt
> Use this file to discover all available pages before exploring further.

# Paragraph

> Create paragraph nodes for standard text blocks in your editor.

The Paragraph extension allows you to create paragraph nodes. It's one of the most basic and essential nodes for any editor.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @tiptap/extension-paragraph
  ```

  ```bash yarn theme={null}
  yarn add @tiptap/extension-paragraph
  ```

  ```bash pnpm theme={null}
  pnpm add @tiptap/extension-paragraph
  ```
</CodeGroup>

## Usage

The Paragraph extension is included in the StarterKit by default:

```typescript theme={null}
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
  extensions: [StarterKit],
})
```

To use it standalone:

```typescript theme={null}
import { Editor } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'

const editor = new Editor({
  extensions: [
    Document,
    Paragraph,
    Text,
  ],
})
```

## Configuration

### HTMLAttributes

Custom HTML attributes to add to the rendered paragraph element.

<ParamField path="HTMLAttributes" type="Record<string, any>" default="{}">
  Custom HTML attributes that should be added to the rendered HTML tag.

  ```typescript theme={null}
  Paragraph.configure({
    HTMLAttributes: {
      class: 'my-paragraph',
    },
  })
  ```
</ParamField>

## Commands

### setParagraph

Converts the current node to a paragraph.

```typescript theme={null}
editor.commands.setParagraph()
```

## Keyboard Shortcuts

* **Mod-Alt-0**: Convert current node to paragraph

## Source Code

View the source code on GitHub:

[packages/extension-paragraph/src/paragraph.ts](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-paragraph/src/paragraph.ts)
