Trevixal API
    Preparing search index...

    Function inlineOffsetFromText

    • Map an offset in a textblock's rendered text back to an inline offset. Text contributes one character per position, but an inline atom counts as a single position while rendering however many characters it likes, none at all, for a hard break, so the two scales drift apart the moment a block holds one. An offset landing inside an atom resolves to its nearer edge, since an atom has no positions within it.

      Parameters

      Returns number