Kind: Function
Source: atloria-monorepo/packages/editor/src/RealmWithPlugins.tsx
A function that creates an editor plugin.
Signature
tsfunction realmPlugin(plugin: {
/**
* Called when the MDXEditor component is mounted and the plugin is initialized.
*/
init?: (realm: Realm, params?: Params) => void
/**
* Called after the MDXEditor component is mounted and all plugins are initialized.
*/
postInit?: (realm: Realm, params?: Params) => void
/**
* Called on each re-render. Use this to update the realm with updated property values.
*/
update?: (realm: Realm, params?: Params) => void
}): (params?: Params) => RealmPlugin
Parameters
| Name | Type |
|---|---|
plugin | `{ |
| /** |
- Called when the MDXEditor component is mounted and the plugin is initialized. */ init?: (realm: Realm, params?: Params) => void
/**
- Called after the MDXEditor component is mounted and all plugins are initialized. / postInit?: (realm: Realm, params?: Params) => void /*
- Called on each re-render. Use this to update the realm with updated property values. */ update?: (realm: Realm, params?: Params) => void }` |
Returns: (params?: Params) => RealmPlugin
Was this page helpful?