Skip to content

CodeMirrorEditor.getRange method

CodeMirrorEditor › getRange

Unofficial

Get the text between two positions.

Signature:

getRange(from: EditorPosition, to: EditorPosition): string

Parameters:

ParameterTypeDescription
fromEditorPositionThe start position.
toEditorPositionThe end position.

Returns: stringThe text between the two positions.