update_node_content
Update CherryTree node content by replacing or appending plain text or rich XML. Automatic rollback with audit report ensures safe edits.
Instructions
Update content of a node.
WARNING: With append=False this REPLACES all body content (text, codeboxes, images, tables). Use append=True to safely add content at the end.
Returns: Confirmation message followed by byte-by-byte audit report. On XML parse failure, backup is restored automatically (ROLLBACK).
Args: node_id: Node ID. content: Plain text to set or append (ignored if content_xml is set). content_xml: Raw CherryTree XML body — supports full formatting. Accepts any combination of: segments with formatting attributes (weight="heavy" for bold, foreground="#RRRRGGGGBBBB", background, style="italic", underline="single", strikethrough="true", scale="h1"-"h6"|"small"|"sup"|"sub", family="monospace", justification, link="webs URL"|"node UID"|"file BASE64"|"fold BASE64", indent), (char_offset, syntax_highlighting, frame_width, frame_height), (char_offset, col_widths, with rows/cells), (char_offset, anchor, filename, link). char_offset = position in concatenated plain text of all where the widget renders; each widget occupies exactly 1 char. append: True = append, False = replace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | ||
| content | No | ||
| node_id | Yes | ||
| content_xml | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |