Skip to content

CodeMirrorEditor.clipPos method

CodeMirrorEditor › clipPos

Unofficial

Clip a position to be within the document bounds.

Signature:

clipPos(pos: EditorPosition): EditorPosition

Parameters:

Parameter Type Description
pos EditorPosition The editor position to clip.

Returns: EditorPositionThe clipped position within document bounds.