Skip to content

Editor.getRange method

Editor › getRange

Official

Get the range between two positions.

Signature:

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

Parameters:

ParameterTypeDescription
fromEditorPositionThe start position.
toEditorPositionThe end position.

Returns: stringThe range between the two positions.

Since: 0.11.11

Example:

console.log(editor.getRange(from, to));