Skip to main content

preset-react

package @remirror/preset-react

class PlaceholderExtension

The placeholder extension which adds a placeholder annotation to an empty document.

Signature:

export declare class PlaceholderExtension extends PlainExtension<PlaceholderOptions> 

Extends: PlainExtension<PlaceholderOptions>

(Some inherited members may not be shown because they are not represented in the documentation.)

property name

Signature:

get name(): "placeholder";

method createAttributes

Signature:

createAttributes(): ProsemirrorAttributes;

Returns:

ProsemirrorAttributes

method createPlugin

Signature:

createPlugin(): CreateExtensionPlugin;

Returns:

CreateExtensionPlugin

method onSetOptions

Signature:

protected onSetOptions(props: OnSetOptionsProps<PlaceholderOptions>): void;

Parameters:

ParameterTypeDescription
propsOnSetOptionsProps<PlaceholderOptions>

Returns:

void

class ReactExtension

This extension supplies all required extensions for the functionality of the React framework implementation.

Provides support for SSR, Placeholders and React components for components when using **remirror** with React.

Signature:

export declare class ReactExtension extends PlainExtension<ReactExtensionOptions> 

Extends: PlainExtension<ReactExtensionOptions>

(Some inherited members may not be shown because they are not represented in the documentation.)

property name

Signature:

get name(): "react";

method createExtensions

Signature:

createExtensions(): (PlaceholderExtension | ReactComponentExtension)[];

Returns:

(PlaceholderExtension | ReactComponentExtension)[]

method onSetOptions

Signature:

protected onSetOptions(props: OnSetOptionsProps<ReactExtensionOptions>): void;

Parameters:

ParameterTypeDescription
propsOnSetOptionsProps<ReactExtensionOptions>

Returns:

void

interface PlaceholderOptions

Signature:

export interface PlaceholderOptions 

property emptyNodeClass

The class to decorate the empty top level node with. If you change this then you will also need to apply your own styles.

Signature:

emptyNodeClass?: string;

property placeholder

The placeholder text to use.

Signature:

placeholder?: string;

interface PlaceholderPluginState

Signature:

export interface PlaceholderPluginState extends Required<PlaceholderOptions> 

Extends: Required<PlaceholderOptions>

(Some inherited members may not be shown because they are not represented in the documentation.)

property empty

Signature:

empty: boolean;

interface ReactExtensionOptions

Signature:

export interface ReactExtensionOptions extends PlaceholderOptions, ReactComponentOptions 

Extends: PlaceholderOptions, ReactComponentOptions

(Some inherited members may not be shown because they are not represented in the documentation.)

property emptyNodeClass

The class to decorate the empty top level node with. If you change this then you will also need to apply your own styles.

Signature:

emptyNodeClass?: string;

property placeholder

The placeholder text to use.

Signature:

placeholder?: string;