UNPKG

778 BTypeScriptView Raw
1import { Mappable, Step, StepResult } from 'prosemirror-transform';
2import { Node as ProseMirrorNode, Schema } from 'prosemirror-model';
3/**
4 * For more context on what this is about:
5 * @see https://discuss.prosemirror.net/t/preventing-image-placeholder-replacement-from-being-undone/1394
6 */
7export declare class SetAttrsStep extends Step {
8 pos: number;
9 attrs: object;
10 constructor(pos: number, attrs: object);
11 apply(doc: ProseMirrorNode): StepResult<any>;
12 invert(doc: ProseMirrorNode): SetAttrsStep;
13 map(mapping: Mappable): SetAttrsStep | null;
14 toJSON(): {
15 stepType: string;
16 pos: number;
17 attrs: object;
18 };
19 static fromJSON(_schema: Schema, json: {
20 pos?: number;
21 attrs: object;
22 }): SetAttrsStep;
23}