Skip to content

CodeMirrorEditor.replaceRange method

CodeMirrorEditor › replaceRange

Unofficial

Replace the text in the given range.

Signature:

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

Parameters:

ParameterTypeDescription
textstringThe replacement text.
fromEditorPositionThe start position of the range.
to?EditorPosition | undefinedThe end position of the range.

Returns: void