UNPKG

@atlaskit/editor-plugin-block-controls

Version:

Block controls plugin for @atlaskit/editor-core

32 lines 1.04 kB
import { interactionTrackingPluginKey } from './pm-plugin'; export var stopEditing = function stopEditing(view) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'stopEditing' })); }; export var startEditing = function startEditing(view) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'startEditing' })); }; export var mouseLeave = function mouseLeave(view) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'mouseLeave' })); }; export var mouseEnter = function mouseEnter(view) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'mouseEnter' })); }; export var setHoverSide = function setHoverSide(view, side) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'setHoverSide', side: side })); }; export var clearHoverSide = function clearHoverSide(view) { view.dispatch(view.state.tr.setMeta(interactionTrackingPluginKey, { type: 'clearHoverSide' })); };