Skip to content

Editor.offsetToPos method

Editor › offsetToPos

Official

Convert an offset to a position.

Signature:

offsetToPos(offset: number): EditorPosition

Parameters:

Parameter Type Description
offset number The offset to convert.

Returns: EditorPositionThe position.

Since: 0.11.11

Example:

console.log(editor.offsetToPos(123));