@remirror/preset-react

The core preset providing the functionality you need and want.

Usage no npm install needed!

<script type="module">
  import remirrorPresetReact from 'https://cdn.skypack.dev/@remirror/preset-react';
</script>

README

@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.