• Tries to get the recommended plugin (invokes has prior to getting it) and returns it, if available.

    If missing, undefined is returned and prior to that optional onMissing gets invoked. onMissing may be used, to log relevant effects.

    Type Parameters

    • TConstructor extends PluginClassConstructor<TContext>
    • TContext extends default = default

    Parameters

    • editor: TContext

      the editor instance to get the plugin from

    • key: TConstructor

      identifier for the plugin (by name or constructor)

    • Optional onMissing: OnMissingPlugin

      optional callback invoked with plugin name, if plugin is missing. Defaults to some generic message on not found plugin at debug level.

    Returns InstanceType<TConstructor> | undefined

  • Tries to get the recommended plugin (invokes has prior to getting it) and returns it, if available.

    If missing, undefined is returned and prior to that optional onMissing gets invoked. onMissing may be used, to log relevant effects.

    Type Parameters

    • TName extends string
    • TContext extends default = default

    Parameters

    • editor: TContext

      the editor instance to get the plugin from

    • key: TName

      identifier for the plugin (by name or constructor)

    • Optional onMissing: OnMissingPlugin

      optional callback invoked with plugin name, if plugin is missing. Defaults to some generic message on not found plugin at debug level.

    Returns PluginsMap[TName] | undefined