> ## 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.

# Blockquote

> Create blockquote nodes for quoted text or content.

The Blockquote extension allows you to create blockquote nodes for quoted content. It wraps block-level content and is commonly used for citations or emphasized passages.

## Installation

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

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

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

## Usage

The Blockquote 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 Blockquote from '@tiptap/extension-blockquote'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'

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

## Configuration

### HTMLAttributes

Custom HTML attributes to add to the blockquote element.

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

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

## Commands

### setBlockquote

Wraps the current selection in a blockquote.

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

### toggleBlockquote

Toggles a blockquote. If the current node is already wrapped in a blockquote, it unwraps it.

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

### unsetBlockquote

Removes the blockquote wrapping from the current selection.

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

## Keyboard Shortcuts

* **Mod-Shift-B**: Toggle blockquote

## Input Rules

The Blockquote extension supports Markdown-style input rules:

* Type `>` followed by a space to create a blockquote

## Source Code

View the source code on GitHub:

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