UNPKG

@atlaskit/editor-plugin-local-id

Version:

LocalId plugin for @atlaskit/editor-core

11 lines (10 loc) 600 B
import type { Transaction } from '@atlaskit/editor-prosemirror/state'; import type { AddMissingLocalIdsOptions } from '../localIdPluginType'; export declare const localIdNotEmpty: (localId: unknown) => boolean; export declare const addMissingLocalIdsToDocument: (tr: Transaction, { onRepaired }?: AddMissingLocalIdsOptions) => boolean; /** * Batch adds local IDs to nodes using a BatchAttrsStep * @param nodesToUpdate Map of position -> localId for nodes that need updates * @param tr */ export declare const batchAddLocalIdToNodes: (nodesToUpdate: Map<number, string>, tr: Transaction) => void;