Rich text / foldkit-richtext-dom/editor-bundle

EditorState

const · packages/richtext-dom/src/editor-bundle.ts:51

const EditorState: Schema.Struct<{ readonly selection: Schema.NullOr<Schema.Union<readonly [Schema.Struct<{ readonly type: Schema.Literal<"Range">; readonly anchor: Schema.Struct<{ readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly offset: Schema.Number; readonly affinity: Schema.Literals<readonly ["before", "after"]>; }>; readonly focus: Schema.Struct<{ readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly offset: Schema.Number; readonly affinity: Schema.Literals<readonly ["before", "after"]>; }>; }>, Schema.Struct<{ readonly type: Schema.Literal<"Node">; readonly node: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; }>]>>; readonly nextId: Schema.Number; readonly history: Schema.Struct<{ readonly past: Schema.$Array<Schema.Struct<{ readonly document: Schema.Struct<{ readonly version: Schema.Literal<1>; readonly children: Schema.$Array<Schema.Union<readonly [Schema.Struct<{ readonly type: Schema.Literal<"Paragraph">; readonly id: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly children: Schema.$Array<Schema.Struct<{ readonly type: Schema.Literal<"Text">; readonly id: Schema.brand<Schema.NonEmptyString, "foldkit-richtext/NodeId">; readonly text: Schema.String; readonly marks: Schema.$Array<Schema.Union<readonly [Schema.NonEmptyString, Schema.Struct<{ readonly name: Schema.NonEmptyString; readonly props: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema. …;

Its type

type EditorState = typeof EditorState.Type

Interaction state the parent owns beside the document.