Vizel API / core/src / VizelPlugin
Interface: VizelPlugin
Defined in: packages/core/src/plugin-system.ts:28
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:46
Plugin names that must be registered before this plugin
description?
optional description?: string;Defined in: packages/core/src/plugin-system.ts:34
Human-readable plugin description
extensions?
optional extensions?: Extensions;Defined in: packages/core/src/plugin-system.ts:36
Tiptap extensions to add to the editor
name
name: string;Defined in: packages/core/src/plugin-system.ts:30
Unique plugin identifier (must be kebab-case, e.g. "my-plugin")
onInstall?
optional onInstall?: (editor) => void;Defined in: packages/core/src/plugin-system.ts:40
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:44
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:42
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:38
CSS styles to inject into the document
version
version: string;Defined in: packages/core/src/plugin-system.ts:32
Plugin version (semver format, e.g. "1.0.0")