UNPKG

@atlaskit/editor-plugin-local-id

Version:

LocalId plugin for @atlaskit/editor-core

15 lines (14 loc) 453 B
import { addMissingLocalIdsToDocument } from '../pm-plugins/add-missing-local-ids'; /** * Scans the current document and adds missing local IDs. */ export var addMissingLocalIds = function addMissingLocalIds() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return function (_ref) { var tr = _ref.tr; if (!addMissingLocalIdsToDocument(tr, options)) { return null; } return tr; }; };