UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

12 lines 401 B
import { removeConnectedNodes } from '@atlaskit/editor-common/utils'; import { createCommand } from '../plugin-factory'; export var removeDescendantNodes = function removeDescendantNodes(sourceNode) { return createCommand({ type: 'UPDATE_STATE', data: { element: undefined } }, function (tr, state) { return sourceNode ? removeConnectedNodes(state, sourceNode) : tr; }); };