@atlaskit/editor-plugin-local-id
Version:
LocalId plugin for @atlaskit/editor-core
13 lines (12 loc) • 699 B
TypeScript
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import { PluginKey, type Transaction } from '@atlaskit/editor-prosemirror/state';
import type { LocalIdPlugin } from '../localIdPluginType';
export declare const localIdPluginKey: PluginKey;
export declare const createPlugin: (api: ExtractInjectionAPI<LocalIdPlugin> | undefined) => SafePlugin;
/**
* 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;