UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

14 lines (13 loc) 430 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNodesCount = getNodesCount; // When experiment platform_editor_prosemirror_rendered_data is removed, review whether this helper is still needed. function getNodesCount(node) { var count = {}; node.nodesBetween(0, node.nodeSize - 2, function (node) { count[node.type.name] = (count[node.type.name] || 0) + 1; }); return count; }