@atlaskit/editor-plugin-metrics
Version:
Metrics plugin for @atlaskit/editor-core
14 lines • 381 B
JavaScript
import { ActionType } from '../types';
export var 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: ActionType.DELETING_CONTENT
};
};