readMoreActionType


readMoreActionTypestring

Sets or gets the type of read more action for the collapsible text.

Setting the readMoreActionType property sets the type of read more action for the collapsible text. When a site visitor wants to read more, the collapsible text can display the remaining text in 2 ways.

Set the readMoreActionType to one of the following: ExpandOnCurrentPage

  • The collapsible text expands and displays the remaining text on the current page.
  • In the collapsed state, the collapsible text contains the introductory text with the ellipsis and a read more button. When the read more button is clicked, the collapsible text expands.
  • In the expanded state, the ellipsis is hidden, collapsible text shows the remaining text, and a read less button appears. When the read less button is clicked, the collapsible text collapses and goes back to the collapsed state.
  • You can use the expandText() and collapseText() functions to expand and collapse the collapsible text. Note that these functions can only be used for this readMoreActionType.

LinkToContent

  • The collapsible text links to the remaining content.
  • You must define the link to the remaining content. To do this, set the link value in the data object found in the readMoreActionData property.
  • The collapsible text contains the introductory text with the ellipsis. By default, this text is clickable and links to the remaining content link that you defined.
  • Alternatively, you can add a read more button to the collapsible text. In this case, the introductory text is no longer clickable, and the button links to the remaining content link that you defined.
  • Add a read more button by setting the readMoreButtonVisible value in the data object found in the readMoreActionData property to true, or by calling the addReadMoreButton() function.
  • You can remove the read more button from the collapsible text. When you remove the read more button, the introductory text is clickable, and the text links to the remaining content link that you defined.
  • Remove a read more button by setting the 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.

Getting the readMoreActionType property gets the type of read more action for the collapsible text. The readMoreActionType property defaults to LinkToContent.

Was this helpful?
Yes
No