Skip to content

How to create a read/more collapse #3359

Closed Answered by saadeghi
jo-gross asked this question in Q&A
Discussion options

You must be logged in to vote

I suggest JS to cut the text based on word count and then show full text when a button is clicked, this way you will have more control on where exactly the text is cut, so it wouldn't cut in the middle of word like nunc... in the screenshot. (For example you wouldn't want a word like analytics to be cut in half 😅 and there are many words in English that wouldn't look good if cut in half)

Alternatively you can use JS to remove that line-clamp-3 when show more button is clicked.

Let me know if you have a question.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jo-gross
Comment options

Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants