/** * Format painter: copy the inline formatting (marks) at the current selection, * then apply it to the next selection the user makes — like the paint-roller * tool in word processors. The plugin only holds the copied marks and an * "armed" flag; the host drives arm/apply through the exported helpers. */ import { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state'; import { Mark } from 'prosemirror-model'; interface FormatPainterState { marks: readonly Mark[] | null; } export declare const formatPainterKey: PluginKey; export declare function formatPainterPlugin(): Plugin; /** True while the painter is armed (marks captured, waiting to apply). */ export declare function isFormatPainterArmed(state: EditorState): boolean; /** * Arms the painter, capturing the current formatting. Returns a transaction to * dispatch, or null when there is nothing to copy. */ export declare function armFormatPainter(state: EditorState): Transaction | null; /** Disarms the painter without applying. */ export declare function disarmFormatPainter(state: EditorState): Transaction; /** * Applies the copied formatting to the current (non-empty) selection and * disarms. Returns null when not armed or the selection is empty. */ export declare function applyFormatPainter(state: EditorState): Transaction | null; export {};