API / @aionbuilders/nabu/extend

SplitData

Type Stability: stable

What onSplit receives besides the block: where the text is cut, and the tail that moves to the new block.

Definition

TypeScript
import type { SplitData } from '@aionbuilders/nabu/extend';
TypeScript
interface SplitData {
  delta: Delta<string>[];
  offset: number;
}

Properties

Properties of SplitData
PropertyTypeDescription
deltaDelta<string>[]

the text from offset to the end, as a Loro delta

offsetnumber

caret offset in the block's text

Source: src/lib/utils/extensions.js:133