UNPKG

@atlaskit/editor-plugin-metrics

Version:

Metrics plugin for @atlaskit/editor-core

20 lines (19 loc) 526 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkDeletingContent = void 0; var _types = require("../types"); var checkDeletingContent = exports.checkDeletingContent = function checkDeletingContent(step) { var _ref = step, content = _ref.slice.content, from = _ref.from, to = _ref.to; var isDeletingContent = to !== from && content.childCount === 0; if (!isDeletingContent) { return undefined; } return { type: _types.ActionType.DELETING_CONTENT }; };