npm.io
3.0.3 • Published 1 year ago

@remirror/preset-react

Licence
MIT
Version
3.0.3
Deps
5
Size
73 kB
Vulns
0
Weekly
0
Stars
3.0K

@remirror/preset-react

The preset which provides all required React extensions for your editor.

Version Weekly Downloads Bundled size Typed Codebase MIT License


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.

Keywords