addReadMoreButton( )
Adds a read more button that links to the remaining text when clicked.
Description
Note: This function is only relevant if the
readMoreActionType
property is set toLinkToContent
.
By default, the introductory text in the collapsible text is a hyperlink, and links to the remaining text when clicked.
The addReadMoreButton()
function adds a read more button to the collapsible text element. When the read more button is added, the introductory text is no longer clickable and instead the button links to the remaining content defined by the link
value of the LinkToContent
object in the readMoreActionData
property.
Adding a read more button sets the value of the readMoreButtonVisible
of the LinkToContent
object in the readMoreActionData
property to true
.
Syntax
function addReadMoreButton([buttonText: string]): void
addReadMoreButton Parameters
NAME
TYPE
DESCRIPTION
Text of the read more button.
Returns
This function does not return anything.
Return Type:
Was this helpful?
Add a read more button
1$w('#myCollapsibleText').addReadMoreButton('Show More Content');