code.setLines
Replace specific lines in a code node to update code sections efficiently without rewriting entire files.
Instructions
Replace a range of lines in a code node. More efficient than setCode for partial updates.
The number of lines being replaced equals the length of the 'lines' array. Lines at startLine through startLine + lines.length - 1 will be replaced.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Code node ID or name | |
| startLine | Yes | Starting line number (0-indexed) | |
| lines | Yes | Array of line strings to insert/replace |