1.8

Table Of Contents
l
When checked, the option Convert fields to JSON string writes the results from
the script into an attribute or text as a JSON string. This is useful for Web contexts
where a front-end script can read this value easily.
l
OK: Click to save any changes made to the script, apply the changes in the template, and
close the dialog.
l
Cancel: Click to close the dialog without saving changes.
l
Expand: Click to convert the script generator to a regular script. Note that this action is not
reversible once the regular script has been saved.
l
Apply: Saves changes made to the script and applies the changes in the template
without closing the dialog.
Epanded Script window
When expanded, the Script window replaces all parts of the wizard below the Selector by a box
in which the script can be typed. See "Writing your own scripts" on page260.
For an overview of keyboard shurtcuts that can be used in this script editor, see "Keyboard
shortcuts" on page372.
Chart Script dialog
These are the options in the Chart Script dialog:
l
Name: The name of the script, making it easier to identify it.
l
Find: The Selector or Text to apply the result of the script to.
l
Selector: Uses CSS selectors to find the element to which the script applies.
l
Text: Uses text as a trigger for the script. The script applies to all instances of the
text found in the template.
l
Selector and Text: Uses text as a trigger for the script but only applies to text within
the specified Selector.
l
Input Type: Use the drop-down to select the source of the data to add to the Chart. The
selection changes the options below:
l
Static Labels: Select to use a static number of data lines below. The chart will
always have the same number of items.
l
Data List: Lists the data lines that are part of the Chart. Each line represents a
segment of the pie as well as a label if they are shown.
Page 354