remirror/remirror

View on GitHub
docs/extensions/hard-break-extension.mdx

Summary

Maintainability
Test Coverage
---
hide_title: true
title: 'HardBreakExtension'
---

import Basic from '../../website/extension-examples/extension-hard-break/basic';

# `HardBreakExtension`

## Summary

An extension which provides the functionality for inserting a `hardBreak` `<br />` tag into the editor.

It will automatically exit when used inside a `codeClock`. To prevent problems occurring when the codeblock is the last node in the doc, you should add the `TrailingNodeExtension` which automatically appends a paragraph node to the last node.

## Usage

### Installation

This extension is installed for you when you install the main `remirror` package.

You can use the imports in the following way:

```ts
import { HardBreakExtension } from 'remirror/extensions';
```

The extension is provided by the `@remirror/extension-hard-break` package.

### Examples

<Basic />

## API

- [HardBreakExtension](../api/extension-hard-break)