@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
18 lines (17 loc) • 563 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.removeDescendantNodes = void 0;
var _utils = require("@atlaskit/editor-common/utils");
var _pluginFactory = require("../plugin-factory");
var removeDescendantNodes = exports.removeDescendantNodes = function removeDescendantNodes(sourceNode) {
return (0, _pluginFactory.createCommand)({
type: 'UPDATE_STATE',
data: {
element: undefined
}
}, function (tr, state) {
return sourceNode ? (0, _utils.removeConnectedNodes)(state, sourceNode) : tr;
});
};