Skip to content

CodeMirrorEditor.indexFromPos method

CodeMirrorEditor › indexFromPos

Unofficial

Convert an editor position to a character index within the document.

Signature:

indexFromPos(pos: EditorPosition): number

Parameters:

Parameter Type Description
pos EditorPosition The editor position to convert.

Returns: numberThe character index.