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 | undefined, origin?: string | undefined): void

Parameters:

ParameterTypeDescription
replacementstringThe replacement text.
fromPositionThe start position.
to?Position | undefinedThe optional end position.
origin?string | undefinedOptional origin string.

Returns: void