Readonly
apiReturns the API object of the extension if the node is an extension node.
When the ext
parameter is provided, it checks if the node is an instance
of the given extension and returns the object's TypeScript type. Otherwise,
it returns the API object of the extension, but without any type checking.
API of the extension
Given a character index in local coordinates, find the ID of the character in the global coordinates.
Index of the character or -1
for before the first character.
ID of the character after which the given position is located.
Given a position in global coordinates, find the position in local coordinates.
ID of the character.
Index of the character in local coordinates. Returns -1 if the the position refers to the beginning of the string.
Local changes API for the
str
JSON CRDT node StrNode. This API allows to insert and delete bytes in the UTF-16 string by referencing its local character positions.