@atlaskit/editor-plugin-local-id
Version:
LocalId plugin for @atlaskit/editor-core
20 lines (19 loc) • 606 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addMissingLocalIds = void 0;
var _addMissingLocalIds = require("../pm-plugins/add-missing-local-ids");
/**
* Scans the current document and adds missing local IDs.
*/
var addMissingLocalIds = exports.addMissingLocalIds = function addMissingLocalIds() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return function (_ref) {
var tr = _ref.tr;
if (!(0, _addMissingLocalIds.addMissingLocalIdsToDocument)(tr, options)) {
return null;
}
return tr;
};
};