Back to API Reference
Class

TextChangeReason

static

Hierarchical reason string carried by DocumentChanged. Integrators switch on these to react differently to user typing vs paste vs programmatic mutation. Format is dotted-prefix so consumers can match by prefix: input.* is exclusively user-originated (so reason.StartsWith("input.") means "the user did this"), program.* is integrator code, sync.* is network / collaborative sync. Narrower prefixes refine further — e.g. reason.StartsWith("input.type") covers Type and TypeCompose.

public static const string Type

User-driven character input (keyboard, mobile keyboard, on-screen).

public static const string TypeCompose

IME composition commit. Distinguish from plain Type for CJK/emoji autocorrect handling.

public static const string Paste

Paste from system clipboard (Ctrl+V, context-menu, programmatic Paste).

public static const string Delete

Deletion of an explicit range (selection) — no direction.

public static const string DeleteBackward

Backward deletion from the caret — Backspace, word / line-start variants.

public static const string DeleteForward

Forward deletion from the caret — Delete key, word / line-end variants.

public static const string Cut

Cut to clipboard — copy followed by selection deletion.

public static const string Drop

Drag-and-drop text insertion. Reserved; emitted when drop pipeline lands.

public static const string Programmatic

Integrator-driven mutation via SetText / SetTextProgrammatic — not user input, hence outside input.*.

public static const string Format

Autoformat conversion — typed markup replaced by its styling.

public static const string Restore

Undo / Redo replay. User-visible restoration of a prior document state.

public static const string Network

Network / collaborative-sync inbound — not user input, hence outside input.*. Reserved for P2.S.