Back to API Reference
Struct

EditProposal

sealed

A full pending edit as an input filter sees it: Inserted text about to replace ReplacedRange in the pre-edit Document (an empty range at the caret for a pure insert). Filters judge the post-state this proposal produces — replacing a selection is legal whenever the result is legal, regardless of what the replaced text contained.

[ctor]public EditProposal()
public readonly ITextDocument Document

Pre-edit document, read-only.

public readonly TextRange ReplacedRange

Codepoint range being replaced. Empty at the caret for a pure insert.

public readonly ReadOnlySpan<char> Inserted

Replacement text. Empty for a pure deletion.

public readonly string Reason

Why the edit is happening — a TextChangeReason constant.