Skip to content

CodeMirrorEditor.replaceRange method

CodeMirrorEditor › replaceRange

Unofficial

Replace the text in the given range.

Signature:

replaceRange(text: string, from: EditorPosition, to?: EditorPosition): void

Parameters:

ParameterTypeDescription
textstringThe replacement text.
fromEditorPositionThe start position of the range.
to?EditorPositionThe end position of the range.

Returns: void