ViewPlugin

class ViewPlugin<V : PluginValue>(val spec: PluginSpec<V>)

A view plugin contributes behaviour and/or decorations to the editor view.

To add a plugin to the editor, call asExtension and include the result in the state's extension configuration.

val myPlugin = ViewPlugin.define(create = { session -> MyPluginValue(session) })

EditorState.create(EditorStateConfig(extensions = myPlugin.asExtension()))

Constructors

Link copied to clipboard
constructor(spec: PluginSpec<V>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Returns an Extension that, when included in an EditorState's configuration, registers this plugin with the EditorSession.