Event target for listening to node changes. You can subscribe to "view"
events, which are triggered every time the node's view changes.
node.events.on('view', () => {
// do something...
});
Returns a proxy object that allows to access array elements by index.
Proxy object that allows to access array elements by index.
Optional
path: ApiPathReturns 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
Returns 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
Optional
path: ApiPathOptional
path: ApiPathDeletes a range of elements at a given position.
Position at which to delete elements.
Number of elements to delete.
Reference to itself.
Find a child node at the given path starting from this node.
Optional
path: ApiPathPath to the child node to find.
JSON CRDT node at the given path.
Get API instance of a child node.
Index of the element to get.
Child node API for the element at the given index.
Inserts elements at a given position.
Position at which to insert elements.
Values or schema of the elements to insert.
Get the length of the array without materializing it to a view.
Length of the array.
Optional
path: ApiPathInserts elements at the end of the array.
Values or schema of the elements to insert at the end of the array.
Optional
path: ApiPathOptional
path: ApiPathUpdates (overwrites) an element at a given position.
Position at which to update the element.
Value or schema of the element to replace with.
Optional
path: ApiPathOptional
path: ApiPath
Local changes API for the
arr
JSON CRDT node ArrNode. This API allows to insert and delete elements in the array by referencing their local index.