Search.../

maxLines

Sets or gets the maximum number of lines of introductory text in the collapsible text.

Description

Setting the maxLines property sets the maximum number of lines to display in the collapsible text element as the introductory text, before a site visitor performs an action to read more and display the remaining text. The introductory text is accompanied by an ellipsis to signal to the site visitor that there is additional text.

Getting the maxLines property gets the maximum number of lines to display in the collapsible text element as the introductory text, before a site visitor performs an action to read more and display the remaining text.

Type:

numberRead & Write

Was this helpful?

Get the maximum number of lines

Copy Code
1const myMaxLinesValue = $w('#myCollapsibleText').maxLines // 4
Set the maximum number of lines

Copy Code
1$w('#myCollapsibleText').maxLines = 4;