Back to API Reference
Struct

InputEdit

sealed

Describes a prospective committed-text replacement passed by reference through InputFilter. Filters may rewrite its range, replacement, caret, and attributed payload or reject it; composition previews, history replay, and programmatic text assignments do not enter this pipeline.

public string Reason{ get; set }

Gets the TextChangeReason associated with the edit.

public bool Rejected{ get; set }

Gets whether the edit is rejected; setting it rejects the edit for the rest of the filter chain.

public void RemoveFormatting()

Removes matching formatting from attributed pasted content without changing its text.

public string text

Replacement text, or an empty string for a deletion.

public int insertCodepointIndex

Codepoint index at which the replacement begins.

public int replacedCodepoints

Number of codepoints replaced at insertCodepointIndex.

public ITextDocument document

Committed document state preceding the edit.

public int caret

Resulting caret codepoint, or -1 to place it after the inserted text.