PluginSpec
This is the type passed to the Plugin
constructor. It provides a definition for a plugin.
§Properties
Allows the plugin to append another transaction to be applied after the given array of transactions. When another plugin appends a transaction after this was called, it is called again with the new state and new transactions—but only the new transactions, i.e. it won't be passed transactions that it already saw.
When present, this will be called before a transaction is applied by the state, allowing the plugin to cancel it (by returning false).
The view props added by this plugin. Props
that are functions will be bound to have the plugin instance as
their this
binding.
Allows a plugin to define a state field, an extra slot in the state object in which it can keep its own data.
When the plugin needs to interact with the editor view, or set something up in the DOM, use this field. The function will be called when the plugin's state is associated with an editor view.