<textList>
The <textList> is a Text
component that stores a list of texts, each like a <text>.
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>
Highlighted (1)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
Other (2)
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.
fixedboolean. Default 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.
isResponseboolean. Default value: false. Whether 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 list.
$t.numValuesnumber. The number of values in the list.
$t.unorderedboolean. Whether the order of items in this list should be treated as unordered (e.g. for matching).
Common to all components (8)
$t.disabledIn developmentboolean. Whether this component is disabled and cannot be interacted with.
$t.doenetMLtext. The DoenetML source code that produced this component.
$t.fixedIn developmentboolean. Whether this component's value is fixed and cannot be modified.
$t.fixLocationIn developmentboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$t.hideboolean. Whether to hide this component from the rendered output.
$t.isResponseIn developmentboolean. Whether this component is treated as a response for the purposes of assessment.
$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 texts 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 texts displayed is 3, even
though there are 5 texts listed directly between the opening and closing <textList> tags.