Package Exports
- @remirror/preset-react
- @remirror/preset-react/dist/preset-react.browser.cjs.js
- @remirror/preset-react/dist/preset-react.browser.esm.js
- @remirror/preset-react/dist/preset-react.cjs.js
- @remirror/preset-react/dist/preset-react.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@remirror/preset-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@remirror/preset-react
The core preset providing the functionality you need and want.
Installation
# yarn
yarn add @remirror/preset-react@next @remirror/pm@next
# pnpm
pnpm add @remirror/preset-react@next @remirror/pm@next
# npm
npm install @remirror/preset-react@next @remirror/pm@nextThis package is available via remirror/preset/react 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/core';
import { CorePreset } from 'remirror/preset/core';
import { ReactPreset } from 'remirror/preset/react';
const reactPreset = new ReactPreset({ rootContent: 'block*' });
// Create the preset
const reactPreset = new ReactPreset(transformers);
// Create the Editor Manager with the required preset.
const manager = RemirrorManager.create([reactPreset]);The useManager hook automatically includes both the CorePreset and the ReactPreset so you may never need to reference this package directly.