@atlaskit/editor-plugin-local-id
Version:
LocalId plugin for @atlaskit/editor-core
13 lines (12 loc) • 307 B
JavaScript
import { addMissingLocalIdsToDocument } from '../pm-plugins/add-missing-local-ids';
/**
* Scans the current document and adds missing local IDs.
*/
export const addMissingLocalIds = (options = {}) => ({
tr
}) => {
if (!addMissingLocalIdsToDocument(tr, options)) {
return null;
}
return tr;
};