Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Plugin

Plugins bundle functionality that can be added to an editor. They are part of the editor state and may influence that state and the view that contains it.

class Plugin<PluginState = any> {
constructor(spec: PluginSpec<PluginState>);
readonly props: EditorProps<Plugin<PluginState>>;
readonly spec: PluginSpec<PluginState>;
 
getState(state: EditorState): PluginState | undefined;
}

§Type Parameters

§
PluginState = any
[src]

§Constructors

§
new Plugin(spec: PluginSpec<PluginState>)
[src]

Create a plugin.

§Properties

§
props: EditorProps<Plugin<PluginState>>
[src]

The props exported by this plugin.

§
spec: PluginSpec<PluginState>
[src]

The plugin's spec object.

§Methods

§
getState(state: EditorState): PluginState | undefined
[src]

Extract the plugin's state field from an editor state.