PluginKey
A key is used to tag plugins in a way that makes it possible to find them, given an editor state. Assigning a key does mean only one plugin of that type can be active in a state.
class PluginKey<PluginState = any> {}
constructor(name?: string);
§Methods
§
get(state: EditorState): Plugin<PluginState> | undefined
[src]Get the active plugin with this key, if any, from an editor state.
§
getState(state: EditorState): PluginState | undefined
[src]Get the plugin's state from an editor state.