Text reader

Allows long sections of text to be displayed in a collapsible pane, which may be toggled to show more or less data.

Data binding

Set or modify the data binding for the view in the General properties. Text reader can be bound to a String variable.

Configuration properties

Under Configuration, set or modify the appearance and behavior properties for the view.

Screen size
A configuration property that has the Screen Sizes icon The Screen Sizes icon beside the property name can have different values for each screen size. If you do not set a value, the screen size inherits the value of the next larger screen size as its default value. If you are using the Process Designer desktop editor (deprecated), you are setting the value for the large screen size. The other screen sizes inherit this value.
Theme definitions
Theme definitions specify the colors and styles for a view and determine its appearance. You can preview the look and feel of views in the theme editor. See Themes.

The appearance configuration properties for Text reader are shown in the following table:

Table 1. Appearance configuration properties for Text reader
Appearance configuration property Description Data type
Width The Screen Sizes icon Specifies the width of the view in pixels, percent, or em units. For example: 50px or 20% or 0.4em. If no unit type is specified, px is assumed. String
Height The Screen Sizes icon Specifies the height of the view in px (pixels) or em units. If no unit type is specified, px is assumed. String
Size The Screen Sizes icon Specifies the size of the label and text.
  • Default
  • Large
  • Small
String
Label placement The Screen Sizes icon Specifies the placement of the label in relation to the text.
  • Top
  • Left
Note: Labels on the left change the specified width of the view.
String
Label width Large screen icon The width of the label. You can specify the width in px (pixels), % (percent), or em units. For example, 50px, 20%, or 0.4em. If a unit type is not specified, px is assumed. String
The behavior configuration properties for Text reader are listed in the following table:
Table 2. Behavior configuration properties for Text reader
Behavior configuration property Description Data type
Max text length Specifies the maximum number of characters that are displayed until the Read More hint is shown.

If no number is specified or the number is lesser than 1, the default value of 128 characters is used.

Integer
Read more hint The placeholder text that is displayed for the Read More hint. String
Read less hint The placeholder text that is displayed for the Read Less hint. String
Initially expanded Specifies whether the text section is expanded when the page is loaded. Boolean

Events

Set or modify the event handlers for the view in the Events properties. You can set events to be triggered programmatically or when a user interacts with the view. For information about how to define and code events, see User-defined events.
Text reader has the following types of event handlers:
  • On load: Activated when the page loads. For example:
    if (${DeviceSensor}.getDeviceInfo().isIPhone) {me.setExpanded(false);} else {me.setExpanded(true);}
  • On click: Activated when the view is clicked. For example:
    me.toggleExpanded()
  • On expand: Activated when the user expands the text. For example:
    ${TextReader2}.setExpanded(false)
  • On collapse: Activated when the user collapses the text. For example:
    ${TextReader2}.setExpanded(true)

Methods

For detailed information on the available methods for Text reader, see the Text reader JavaScript API.

Additional resources

For information about how to create a coach, see Building coaches.
For information about standard properties (General, Configuration, Positioning, Visibility, and HTML Attributes), see View properties.