import { InferLeafBlockNode } from '../doc/types-infer.js'; import { DocNode, Range } from '../doc/types.js'; import { Editor } from '../editor.js'; /** * A plugin to make specific blocks read-only. * * Locked blocks can still be selected and copied, but operations editing them are cancelled, * except ones that unlock the block and ones targeting the root (e.g. undo / redo). */ export declare function blockLockPlugin(editor: Editor, options: { /** * A function to check if the block is locked or not. */ isLocked: (node: InferLeafBlockNode) => boolean; }): void; /** * Check if the selection or specified range touches a locked block, which means editing operations on it will be cancelled. */ export declare function LockedInRange(editor: Editor, range?: Range): boolean;