Function: realmPlugin()

realmPlugin<Params>(plugin): (params?) => RealmPlugin

A function that creates an editor plugin.

Type parameters

Type parameterDescription
ParamsThe parameters for the plugin.

Parameters

ParameterTypeDescription
pluginobject-
plugin.init?(realm, params?) => voidCalled when the MDXEditor component is mounted and the plugin is initialized.
plugin.postInit?(realm, params?) => voidCalled after the MDXEditor component is mounted and all plugins are initialized.
plugin.update?(realm, params?) => voidCalled on each re-render. Use this to update the realm with updated property values.

Returns

Function

Parameters

ParameterType
params?Params

Returns

RealmPlugin