UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

12 lines 450 B
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import { pluginKey } from './plugin-key'; import { createPluginState } from './plugin-state'; export var createPlugin = function createPlugin(dispatch) { var initialState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () { return []; }; return new SafePlugin({ state: createPluginState(dispatch, initialState), key: pluginKey }); };