@curvenote/schema
Version:
Schema and markdown parser for @curvenote/editor
12 lines (11 loc) • 617 B
TypeScript
import { EditorState } from 'prosemirror-state';
import type { Node } from 'prosemirror-model';
import type { Parser } from './parse/types';
import type { UseSchema } from './schemas';
export { EditorState };
export declare function docToEditorState(doc: Node, version: number): EditorState;
export declare function getEditorState(useSchema: UseSchema, content: string, version: number, document: Document, DOMParser: Parser): EditorState;
export declare function applySteps(state: EditorState, stepsData: any[], client: string | number): {
state: EditorState;
tr: import("prosemirror-state").Transaction;
};