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:

Parameter Type Description
text string The replacement text.
from EditorPosition The start position of the range.
to? EditorPosition | undefined The end position of the range.

Returns: void