Skip to main content

$getCharacterOffsets

function

Returns the character offsets of the selection's anchor and focus points as an [anchor, focus] tuple.

function $getCharacterOffsets(selection: BaseSelection): [number, number]

Import

import { $getCharacterOffsets } from '@modular/sdk/editor';