Search.../

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 to LinkToContent.

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
buttonText
Optional
string

Text of the read more button.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

Add a read more button

Copy Code
1$w('#myCollapsibleText').addReadMoreButton('Show More Content');