UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

8 lines 312 B
// When experiment platform_editor_prosemirror_rendered_data is removed, review whether this helper is still needed. export function getNodesCount(node) { const count = {}; node.nodesBetween(0, node.nodeSize - 2, node => { count[node.type.name] = (count[node.type.name] || 0) + 1; }); return count; }