Trilium Frontend API
    Preparing search index...

    Interface PluginStaticMembers<TContext>

    Static properties of a plugin.

    interface PluginStaticMembers<TContext = Editor> {
        isContextPlugin?: boolean;
        isOfficialPlugin?: boolean;
        isPremiumPlugin?: boolean;
        licenseFeatureCode?: string;
        pluginName?: string;
        requires?: PluginDependencies<TContext>;
    }

    Type Parameters

    Index

    Properties

    isContextPlugin?: boolean

    A flag which defines if a plugin is allowed or not allowed to be used directly by a module:core/context~Context.

    isOfficialPlugin?: boolean

    A flag which defines if a plugin is an official CKEditor 5 plugin.

    isPremiumPlugin?: boolean

    A flag which defines if a plugin is a premium CKEditor 5 plugin.

    licenseFeatureCode?: string

    An unique id of a plugin which belongs to the free plan on commercial license.

    pluginName?: string

    An optional name of the plugin. If set, the plugin will be available in module:core/plugincollection~PluginCollection#get by its name and its constructor. If not, then only by its constructor.

    The name should reflect the constructor name.

    To keep the plugin class definition tight, it is recommended to define this property as a static getter:

    export class ImageCaption {
    static get pluginName() {
    return 'ImageCaption';
    }
    }

    Note: The native Function.name property could not be used to keep the plugin name because it will be mangled during code minification.

    Naming a plugin is necessary to enable removing it through the module:core/editor/editorconfig~EditorConfig#removePlugins config.removePlugins option.

    An array of plugins required by this plugin.

    To keep the plugin class definition tight it is recommended to define this property as a static getter:

    import { Image } from './image.js';

    export class ImageCaption {
    static get requires() {
    return [ Image ];
    }
    }