The Text Node is used to insert narrative content into your report. It supports both fixed, static text blocks and dynamic content that integrates processed values directly from loaded data files.
| Field | Type | Description | Default Value |
|---|---|---|---|
|
string |
Optional. Identifies the text node within the report. Used for internal cross referencing |
|
|
string |
Must be set to |
|
|
string or object |
The text content or a nested |
Required |
|
string |
The |
|
Static content is the simplest form of a content node and does not require the ref field.
|
Note
|
If the text field is defined as a raw string, the engine automatically treats it as static content unless placeholders are detected.
|
{
"type":"text",
"text":"My custom static text!"
}Dynamic text uses placeholders (@{…}@) to inject data values. The content inside the placeholders follows a simple path and operator syntax.
Use dot (.) notation to traverse nested data structures within the data source referenced by the data field.
-
Dictionary/JSON: Use keys:
@{data_name.key.subkey}@ -
Lists/Arrays: Use numerical indices:
@{data_list.0.item_name}@
Simple operators can be applied to the retrieved value using the pipe (|) syntax to perform common transformations directly at render-time.
| Operator | Description | Example |
|---|---|---|
|
Returns the size of a list, array, or string. |
|
Assume a data file named "results" was loaded, containing the data: {"version": "1.2.3", "timings": [1, 2, 3]}.
{
"type": "text", "ref": "results",
"text": "The report was generated for version @{results.version}@. We analyzed @{results.timings | length}@ samples."
}
// Renders as: "The report was generated for version 1.2.3. We analyzed 3 samples."If you need to override the default dynamic behavior (e.g., change the placeholder delimiters), you can use the detailed configuration object instead of a raw string for the text field.
| Field | Type | Description | Default Value |
|---|---|---|---|
|
string |
The text string containing the narrative and any placeholders. |
Required |
|
string ( |
Explicitly controls processing. If omitted, the mode is inferred based on whether placeholders are detected in the |
Inferred |
|
string |
The regular expression used to identify placeholders in the text. |
|
Assume a data file named "results" was loaded, containing the data: {"version": "1.2.3", "timings": [1, 2, 3]}.
{
"type": "text", "ref": "results",
"text":{
"placeholder":"[[([^}]+)]]",
"content":"The report was generated for version [[results.version]]. We analyzed [[results.timings | length]] samples.",
}
}
// Renders as: "The report was generated for version 1.2.3. We analyzed 3 samples."