Text Stimulus¶
A text stimulus displays a block of text.
Required Properties¶
type¶
content¶
- Definition: The content to be displayed
- Possible values: A string of text (strings are any text enclosed in quotation marks " "). If you'd like to add formatting to your string, the following HTML tags are supported:
<abbr>
,<acronym>
,<b>
,<blockquote>
,<code>
,<em>
,<i>
,<li>
,<ol>
,<strong>
,<ul>
,<p>
.
Optional Properties¶
alignment¶
barrier¶
- Definition: If set to 'true', a duration property must also be specified, and the stimulus will prevent all other subsequent stimuli and responses from appearing on the trial until the specified duration is over.
- Possible values:
true
orfalse
- Default:
false
{
"type": "text",
"content": "This is a text sample",
"barrier": false // the default; safe to omit
}
In trials using the above stimulus code, the text will be displayed for 10 seconds before other stimuli and responses are displayed.
color¶
delay¶
Info
This property is used for presenting multiple stimuli on a trial in a sequence. To implement inter-trial intervals, see the delay parameter in trial templates instead.
Warning
The delaying of multiple stimuli on a trial does NOT have a chain effect. That is, the delay of any stimulus on a trial is always relative to the onset of that trial or the end of the last stimulus acting as a barrier.
- Definition: Delay the onset of a stimulus by a certain number of seconds, relative to (1) the onset of a trial if there are no stimuli acting as barriers or (2) the end of the last stimulus acting as a barrier.
- Possible values: A number in seconds (decimals are supported)
- Default:
0
(no delay)
duration¶
- Definition: Keep a stimulus visible for a certain number of seconds relative to the onset of that stimulus.
- Possible values: A number of seconds (decimals are supported)
- Default:
-1
, meaning that the stimulus, once triggered, will stay on a trial indefinitely - In most cases, it is far more common to manipulate the duration of a trial instead. This feature is generally intended to hide a certain stimulus on a trial with multiple stimuli.
parent¶
- Definition: If specified, then the properties of the specified stimulus will be inherited by this stimulus, unless a property of the same name is defined in this stimulus.
- Possible values: The name of another stimulus
"text0":{
"type": "text",
"content": "The text in these quotation marks will be displayed.",
"size": "30px",
"alignment": "center",
"color": "blue"
}
"text1": {
"type": "text",
"content": "text1 inherits properties from text0.",
"parent": "text0",
"color": "red"
}
text1
stimulus inherits the size
and alignment
properties of text0
. text1
does not inherit the color
property of text0
because the stimulus definition of text1
has its own specified color
property.
prevent_copy¶
- Definition: Whether the participant will be able to copy any part of the text stimulus. If set to
true
, this disables copying-and-pasting behavior at a system level - not only will right-clicking the text stimulus not bring up a menu, but Ctrl/Command + C keyboard shortcuts will not work either. - Possible values:
true
,false
- Default:
false
size¶
- Definition: The font size of the text stimulus
- Possible values: Either 1) HTML font sizes such as
"px"
,"em"
, or"rem"
, or 2) a percentage of the default size - The rendered outcome might differ across browsers and devices.