---
title: Soft Break
---

<ComponentPreview name="soft-break-demo" />

<PackageInfo>

## Features

- Allows insertion of line breaks within a text block without starting a new block.

</PackageInfo>

## Installation

```bash
npm install @udecode/plate-break
```

## Usage

```tsx
import { SoftBreakPlugin } from '@udecode/plate-break/react';
import { CodeBlockPlugin } from '@udecode/plate-code-block/react';
import { BlockquotePlugin } from '@udecode/plate-block-quote/react';
import { TablePlugin } from '@udecode/plate-table/react';

const plugins = [
  // ...otherPlugins,
  SoftBreakPlugin.configure({
    options: {
      rules: [
        { hotkey: 'shift+enter' },
        {
          hotkey: 'enter',
          query: {
            allow: [CodeBlockPlugin.key, BlockquotePlugin.key, TablePlugin.key],
          },
        },
      ],
    },
  }),
];
```

## Keyboard Shortcuts

<KeyTable>
  <KeyTableItem hotkey="Shift + Enter">
    Insert a line break within a block of text without starting a new block.
  </KeyTableItem>
</KeyTable>

## Plugins

### SoftBreakPlugin

<APIOptions>

<APIItem name="rules" type="object[]" optional>
An array of rule objects specifying the hotkey to activate the soft break and an optional filter query.
<APISubList>
<APISubListItem parent="rules" name="hotkey" type="string">
The key combination that activates the soft break.
</APISubListItem>
<APISubListItem parent="rules" name="query" type="QueryNodeOptions" optional>
Filter options to determine the block types where the rule applies.
</APISubListItem>
</APISubList>
</APIItem>
</APIOptions>