Otzel.Op.Delete (otzel v0.3.2)

View Source

An operation that removes content at the current position.

Delete operations are used in changes to indicate that content should be removed from the document.

Fields

  • :count - The number of characters to delete

Examples

# Delete 3 characters
%Otzel.Op.Delete{count: 3}

# Using helper function
Otzel.delete(3)

Note

Delete operations do not have attributes because they remove content entirely rather than modifying it.

Summary

Functions

Callback implementation for Otzel.Op.merge_into/2.

Callback implementation for Otzel.Op.size/1.

Callback implementation for Otzel.Op.take/2.

Types

t()

@type t() :: %Otzel.Op.Delete{count: pos_integer()}

Functions

from_json(map, opts)

merge_into(arg1, arg2)

Callback implementation for Otzel.Op.merge_into/2.

size(map)

Callback implementation for Otzel.Op.size/1.

take(delete, count)

Callback implementation for Otzel.Op.take/2.