@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
10 lines • 340 B
JavaScript
import { removeConnectedNodes } from '@atlaskit/editor-common/utils';
import { createCommand } from '../plugin-factory';
export const removeDescendantNodes = sourceNode => createCommand({
type: 'UPDATE_STATE',
data: {
element: undefined
}
}, (tr, state) => {
return sourceNode ? removeConnectedNodes(state, sourceNode) : tr;
});