Vizel API / core/src / VizelPlugin
Interface: VizelPlugin
Defined in: packages/core/src/plugin-system.ts:29
Plugin interface for extending Vizel with third-party functionality.
Example
import type { VizelPlugin } from "@vizel/core";
import { MyExtension } from "./extension";
export const myPlugin: VizelPlugin = {
name: "my-vizel-plugin",
version: "1.0.0",
description: "Adds cool feature to Vizel",
extensions: [MyExtension],
onInstall: (editor) => {
console.log("Plugin installed");
},
};Properties
dependencies?
optional dependencies?: string[];Defined in: packages/core/src/plugin-system.ts:47
Plugin names that must be registered before this plugin
description?
optional description?: string;Defined in: packages/core/src/plugin-system.ts:35
Human-readable plugin description
extensions?
optional extensions?: Extensions;Defined in: packages/core/src/plugin-system.ts:37
Tiptap extensions to add to the editor
name
name: string;Defined in: packages/core/src/plugin-system.ts:31
Unique plugin identifier (must be kebab-case, e.g. "my-plugin")
onInstall?
optional onInstall?: (editor) => void;Defined in: packages/core/src/plugin-system.ts:41
Called when the plugin is installed (editor is set)
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
Returns
void
onTransaction?
optional onTransaction?: (props) => void;Defined in: packages/core/src/plugin-system.ts:45
Called on each editor transaction
Parameters
| Parameter | Type |
|---|---|
props | { editor: Editor; transaction: Transaction; } |
props.editor | Editor |
props.transaction | Transaction |
Returns
void
onUninstall?
optional onUninstall?: (editor) => void;Defined in: packages/core/src/plugin-system.ts:43
Called when the plugin is uninstalled
Parameters
| Parameter | Type |
|---|---|
editor | Editor |
Returns
void
styles?
optional styles?: string;Defined in: packages/core/src/plugin-system.ts:39
CSS styles to inject into the document
version
version: string;Defined in: packages/core/src/plugin-system.ts:33
Plugin version (semver format, e.g. "1.0.0")