UNPKG

@milkdown/core

Version:

The core module of [milkdown](https://milkdown.dev/).

22 lines 1.11 kB
import type { MilkdownPlugin, TimerType } from '@milkdown/ctx'; import type { Schema } from '@milkdown/prose/model'; import type { JSONRecord, Parser } from '@milkdown/transformer'; import { Node } from '@milkdown/prose/model'; import { EditorState } from '@milkdown/prose/state'; export type DefaultValue = string | { type: 'html'; dom: HTMLElement; } | { type: 'json'; value: JSONRecord; }; type StateOptions = Parameters<typeof EditorState.create>[0]; type StateOptionsOverride = (prev: StateOptions) => StateOptions; export declare const defaultValueCtx: import("@milkdown/ctx").SliceType<DefaultValue, "defaultValue">; export declare const editorStateOptionsCtx: import("@milkdown/ctx").SliceType<StateOptionsOverride, string>; export declare const editorStateTimerCtx: import("@milkdown/ctx").SliceType<TimerType[], "editorStateTimer">; export declare const EditorStateReady: TimerType; export declare function getDoc(defaultValue: DefaultValue, parser: Parser, schema: Schema): Node; export declare const editorState: MilkdownPlugin; export {}; //# sourceMappingURL=editor-state.d.ts.map