Interactive Tree Editor
Click nodes to select, then use buttons to add, remove, or move nodes
Tree
Click a node to select it
Editor Controls
Add Nodes
Move Node
Rename Node
Remove Node
Operation Log
Operation Log
Operations will be logged here...
Tree Editor Methods (v4.5.0+)
Public methods for programmatic tree manipulation
Method Reference
| Method | Description |
|---|---|
addNode(parentPath, data) | Add a new node as child of parent |
removeNode(path, includeDescendants?) | Remove node (and optionally children) |
moveNode(source, target, position) | Move node to new position |
updateNode(path, changes) | Update node data properties |
getSiblings(path) | Get sibling nodes at same level |
getChildren(path) | Get direct children of a node |
getAllData() | Get all data as flat array |
Usage Examples
Basic Usage
Return Types
AddNodeResult
{
success: boolean;
node?: LTreeNode<T>;
path?: string;
error?: string;
} RemoveNodeResult
{
success: boolean;
removedCount: number;
error?: string;
} MoveNodeResult
{
success: boolean;
oldPath: string;
newPath: string;
error?: string;
}