UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

13 lines (12 loc) 423 B
import { removeConnectedNodes } from '@atlaskit/editor-common/utils'; // eslint-disable-next-line import/order import { createCommand } from '../plugin-factory'; // eslint-disable-next-line import/order export const removeDescendantNodes = sourceNode => createCommand({ type: 'UPDATE_STATE', data: { element: undefined } }, (tr, state) => { return sourceNode ? removeConnectedNodes(state, sourceNode) : tr; });