Skip to content

Editor.getRange method

Editor › getRange

Official

Get the range between two positions.

Signature:

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

Parameters:

Parameter Type Description
from EditorPosition The start position.
to EditorPosition The end position.

Returns: stringThe range between the two positions.

Since: 0.11.11

Example:

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