This feature is not yet available to all users.
Collapsible text allows you to display only the first few lines of text (introductory text), and hide the remaining lines of text until a site visitor performs an action to read more and display the remaining text.
text
property.maxLines
property. This is how you divide the introductory text and the remaining text in the collapsible text.ellipsisEnabled
property is true
, and the ellipsis functionality for the collapsible text is turned on. In this case, the ellipsis is shown, and the collapsible text displays the introductory text until a site visitor performs an action to read more and display the remaining text.ellipsisEnabled
property is false
, the ellipsis functionality for the collapsible text is turned off. In this case, the ellipsis is hidden, and the collapsible text displays the full text and acts as a regular text element.disableEllipsis()
function. Turning off the ellipsis functionality sets the ellipsisEnabled
property to false
.enableEllipsis()
function. Turning on the ellipsis functionality sets the ellipsisEnabled
property to true
.readMoreActionType
to one of the following:ExpandOnCurrentPage
expandText()
and collapseText()
functions to expand and collapse the collapsible text. Note that these functions can only be used for this readMoreActionType
.LinkToContent
link
value in the data object found in the readMoreActionData
property.readMoreButtonVisible
value in the data object found in the readMoreActionData
property to true
, or by calling the addReadMoreButton()
function.readMoreButtonVisible
value in the data object found in the readMoreActionData
property to false
, or by calling the removeReadMoreButton()
function. Note that these functions can only be used for this readMoreActionType
.readMoreActionType
there is a readMoreActionData
property. The readMoreActionData
property contains a data object which allows you to define the relevant settings for the selected readMoreActionType
. Set the following data object values for the readMoreActionType
you selected:ExpandOnCurrentPage
readMoreButtonText
: Text of the read more button.readLessButtonText
: Text of the read less button.collapsed
: Whether the collapsible text is currently collapsed.LinkToContent
link
: Required. Link for the remaining content. Supports all link types.target
: Determines where the link opens.readMoreButtonVisible
: Whether the read more button is visible. If true
, the button links to the remaining content link. If false
, the introductory text links to the remaining content link. Defaults to false
.readMoreButtonText
: Text of the read more button.