Skip to content

Doc.replaceRange method

Doc › replaceRange

Unofficial

Replaces the range between the given points with the given string.

Signature:

replaceRange(replacement: string, from: Position, to?: Position, origin?: string): void

Parameters:

ParameterTypeDescription
replacementstringThe replacement text.
fromPositionThe start position.
to?PositionThe optional end position.
origin?stringOptional origin string.

Returns: void