@remirror/preset-react
v3.0.1
Published
The core preset providing the functionality you need and want.
Downloads
147,837
Readme
@remirror/preset-react
The preset which provides all required
React
extensions for your editor.
Installation
# yarn
yarn add @remirror/preset-react
# pnpm
pnpm add @remirror/preset-react
# npm
npm install @remirror/preset-react
This package is available via remirror/presets
when you install remirror
.
Usage
This preset adds
- Server side support for nodes and marks.
- Transformations for server side components.
- Placeholder support for the editor.
import { RemirrorManager } from 'remirror';
import { reactPreset } from 'remirror/extensions';
// Create the Editor Manager with the required preset.
const manager = RemirrorManager.create(() => [...reactPreset()]);
The useRemirror
hook automatically adds both the CorePreset
and ReactPreset
to the editor so you may never need to reference this package directly.