#[unsafe(no_mangle)]pub unsafe extern "C" fn ytext_insert_delta(
txt: *const Branch,
txn: *mut Transaction,
delta: *mut YDeltaIn,
delta_len: u32,
)Expand description
Performs a series of changes over the given YText shared ref type, described by the delta
parameter:
- Deltas constructed with
ydelta_input_retainwill move cursor position by the given number of elements. If formatting attributes were defined, all elements skipped over this way will be wrapped by given formatting attributes. - Deltas constructed with
ydelta_input_deletewill tell cursor to remove a corresponding number of elements. - Deltas constructed with
ydelta_input_insertwill tell cursor to insert given elements into current cursor position. While these elements can be of any type (used for embedding ie. shared types or binary payload like images), for the text insertion ayinput_stringis expected. If formatting attributes were specified, inserted elements will be wrapped by given formatting attributes.