Skip to content

SyntheticBehaviorEvent

SyntheticBehaviorEvent = { annotation: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">; } | { annotation: { name: string; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">; } | { at: BlockPath; props: Record<string, unknown>; type: StrictExtract<SyntheticBehaviorEventType, "block.set">; } | { at: BlockPath; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "block.unset">; } | { at: ChildPath; props: {[prop: string]: unknown; }; type: StrictExtract<SyntheticBehaviorEventType, "child.set">; } | { at: ChildPath; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "child.unset">; } | { at?: { anchor: BlockOffset; focus: BlockOffset; }; decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">; } | { decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">; } | { at: NonNullable<EditorSelection>; direction?: "backward" | "forward"; type: StrictExtract<SyntheticBehaviorEventType, "delete">; unit?: "character" | "word" | "line" | "block"; } | { type: StrictExtract<SyntheticBehaviorEventType, "history.redo">; } | { type: StrictExtract<SyntheticBehaviorEventType, "history.undo">; } | { inlineObject: { name: string; value?: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">; } | { block: BlockWithOptionalKey; placement: InsertPlacement; select?: "start" | "end" | "none"; type: StrictExtract<SyntheticBehaviorEventType, "insert.block">; } | { annotations?: object[]; decorators?: string[]; text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.span">; } | { text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.text">; } | { distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.backward">; } | { at: BlockPath; to: BlockPath; type: StrictExtract<SyntheticBehaviorEventType, "move.block">; } | { distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.forward">; } | { at: EditorSelection; type: StrictExtract<SyntheticBehaviorEventType, "select">; } | AbstractBehaviorEvent

Defined in: behavior.types.event.ts:94

{ annotation: { name: string; value: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">; }

annotation: object

name: string

value: object

[prop: string]: unknown

type: StrictExtract<SyntheticBehaviorEventType, "annotation.add">

{ annotation: { name: string; }; type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">; }

annotation: object

name: string

type: StrictExtract<SyntheticBehaviorEventType, "annotation.remove">

{ at: BlockPath; props: Record<string, unknown>; type: StrictExtract<SyntheticBehaviorEventType, "block.set">; }

at: BlockPath

props: Record<string, unknown>

type: StrictExtract<SyntheticBehaviorEventType, "block.set">

{ at: BlockPath; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "block.unset">; }

at: BlockPath

props: string[]

type: StrictExtract<SyntheticBehaviorEventType, "block.unset">

{ at: ChildPath; props: {[prop: string]: unknown; }; type: StrictExtract<SyntheticBehaviorEventType, "child.set">; }

at: ChildPath

props: object

[prop: string]: unknown

type: StrictExtract<SyntheticBehaviorEventType, "child.set">

{ at: ChildPath; props: string[]; type: StrictExtract<SyntheticBehaviorEventType, "child.unset">; }

at: ChildPath

props: string[]

type: StrictExtract<SyntheticBehaviorEventType, "child.unset">

{ at?: { anchor: BlockOffset; focus: BlockOffset; }; decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">; }

optional at: object

anchor: BlockOffset

focus: BlockOffset

decorator: string

type: StrictExtract<SyntheticBehaviorEventType, "decorator.add">

{ decorator: string; type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">; }

decorator: string

type: StrictExtract<SyntheticBehaviorEventType, "decorator.remove">

{ at: NonNullable<EditorSelection>; direction?: "backward" | "forward"; type: StrictExtract<SyntheticBehaviorEventType, "delete">; unit?: "character" | "word" | "line" | "block"; }

at: NonNullable<EditorSelection>

optional direction: "backward" | "forward"

Defaults to forward deletion.

type: StrictExtract<SyntheticBehaviorEventType, "delete">

optional unit: "character" | "word" | "line" | "block"

Defaults to character deletion.

{ type: StrictExtract<SyntheticBehaviorEventType, "history.redo">; }

type: StrictExtract<SyntheticBehaviorEventType, "history.redo">

{ type: StrictExtract<SyntheticBehaviorEventType, "history.undo">; }

type: StrictExtract<SyntheticBehaviorEventType, "history.undo">

{ inlineObject: { name: string; value?: {[prop: string]: unknown; }; }; type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">; }

inlineObject: object

name: string

optional value: object

[prop: string]: unknown

type: StrictExtract<SyntheticBehaviorEventType, "insert.inline object">

{ block: BlockWithOptionalKey; placement: InsertPlacement; select?: "start" | "end" | "none"; type: StrictExtract<SyntheticBehaviorEventType, "insert.block">; }

block: BlockWithOptionalKey

placement: InsertPlacement

optional select: "start" | "end" | "none"

type: StrictExtract<SyntheticBehaviorEventType, "insert.block">

{ annotations?: object[]; decorators?: string[]; text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.span">; }

optional annotations: object[]

optional decorators: string[]

text: string

type: StrictExtract<SyntheticBehaviorEventType, "insert.span">

{ text: string; type: StrictExtract<SyntheticBehaviorEventType, "insert.text">; }

text: string

type: StrictExtract<SyntheticBehaviorEventType, "insert.text">

{ distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.backward">; }

distance: number

type: StrictExtract<SyntheticBehaviorEventType, "move.backward">

{ at: BlockPath; to: BlockPath; type: StrictExtract<SyntheticBehaviorEventType, "move.block">; }

at: BlockPath

to: BlockPath

type: StrictExtract<SyntheticBehaviorEventType, "move.block">

{ distance: number; type: StrictExtract<SyntheticBehaviorEventType, "move.forward">; }

distance: number

type: StrictExtract<SyntheticBehaviorEventType, "move.forward">

{ at: EditorSelection; type: StrictExtract<SyntheticBehaviorEventType, "select">; }

at: EditorSelection

type: StrictExtract<SyntheticBehaviorEventType, "select">

AbstractBehaviorEvent