<textList>
The <textList> is a Text
component that stores multiple <text> components within a list.
When creating a <textList>, separate items by spaces, not commas.
The component will default to displaying the list with commas. (A comma inside a
<textList> is treated as part of the text itself, just as it would be inside
a <text>.)
Attributes and Properties
Attributes for <textList>
Other (3)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
number. Default value: Infinity. Maximum number of items to retain in the list.
boolean. Default value: false. Whether the order of items should be treated as unordered.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedDefault value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseWhether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <textList name="t">
Other (4)
$t.maxNumbernumber. Maximum number of items to retain in the list.
$t.numComponentsnumber. The number of items in the text list.
$t.numValuesnumber. The number of text values in the list.
$t.unorderedboolean. Whether the order of items should be treated as unordered.
Common to all components (3)
$t.doenetMLtext. The DoenetML source code that produced this component.
$t.hideboolean. Whether to hide this component from the rendered output.
$t.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: <textList> with direct input
In the sample code above, the individual <text> components are listed directly between the opening and closing <textList> tags, with spaces (not commas) to separate list items.
Example: <textList> from user-input
The user is prompted to provide three text responses
with the <textInput/> component, which are then referenced within the
definition of a <textList>. Individual entries in the list can be referenced by index.
Attribute Examples
Attribute Example: unordered
The unordered attribute allows for boolean comparisons between lists,
such as in the <award> component or the <boolean> component,
without regard to the order in which the names of the fruits have been entered.
Attribute Example: maxNumber
In the sample code above, the maximum number of <text> components displayed is 3, even
though there are 5 <text> components listed directly between the opening and closing <textList> tags.