Json Tree
JsonTree is a CRDT-based tree structure that is used to represent the document tree of text-based editor such as ProseMirror.
Functions
Link copied to clipboard
Edits this tree with the given node.
Link copied to clipboard
fun editByPath(fromPath: List<Int>, toPath: List<Int>, vararg contents: JsonTree.TreeNode, splitLevel: Int = 0)
Edits this tree with the given node and path.
Link copied to clipboard
Converts the index range into the TreePosStructRange.
Link copied to clipboard
Returns the path of the given index.
Link copied to clipboard
Converts the path range into the TreePosStructRange.
Link copied to clipboard
Returns the index of given path.
Link copied to clipboard
Converts the position range into the index range.
Link copied to clipboard
Converts the position range into the path range.
Link copied to clipboard
Link copied to clipboard
Sets the attributes to the elements of the given path.