UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

15 lines (14 loc) 484 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 var removeDescendantNodes = function removeDescendantNodes(sourceNode) { return createCommand({ type: 'UPDATE_STATE', data: { element: undefined } }, function (tr, state) { return sourceNode ? removeConnectedNodes(state, sourceNode) : tr; }); };