> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LineBreak extension

Insert soft line breaks and page breaks in your document.

Use line breaks to control text flow without creating new paragraphs. Page breaks force new pages when printing.

## Types of breaks

* **Line Break** - Moves to next line within same paragraph (Shift+Enter)
* **Page Break** - Forces content to start on new page when printing

## Use case

* **Address formatting** - Multiple lines without paragraph spacing
* **Poetry/verses** - Maintain line structure without gaps
* **Print control** - Start chapters or sections on new pages

## Commands

### `insertLineBreak`

Insert a line break

> [!NOTE]
>
> Creates a soft break within the same paragraph

**Example:**

```javascript Usage theme={null}
editor.commands.insertLineBreak()
```

```javascript Full Example theme={null}
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    editor.commands.insertLineBreak()
  },
});
```

### `insertPageBreak`

Insert a page break

> [!NOTE]
>
> Forces content to start on a new page when printed

**Example:**

```javascript Usage theme={null}
editor.commands.insertPageBreak()
```

```javascript Full Example theme={null}
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';

const superdoc = new SuperDoc({
  selector: '#editor',
  document: yourFile,
  onReady: (superdoc) => {
    const editor = superdoc.activeEditor;
    editor.commands.insertPageBreak()
  },
});
```

## Source code

[View on GitHub →](https://github.com/superdoc/docx-editor/tree/main/packages/super-editor/src/editors/v1/extensions/line-break/line-break.js)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.