Truncate long text in rich text block

Truncate long text in rich text block

miltokas
Explorer
77 0 20

Hi there,

I want to truncate some long text in rich text block. Meaning by the end of the first line (yellow) add a show more to expand the other two lines (red).

Can this be done in the Custom CSS section of the Rich Text? How?

Website: https://venga-store.com/collections/festival-outfits-festival-clothing-accessories

Theme: Dawn

 

Thanks a lot!

 

miltokas_1-1719760742379.png

 

 

Replies 3 (3)

namphan
Shopify Partner
405 47 70

Hi @miltokas,

You can refer to the following article for it. 

You can execute the code directly at the collection description.

Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com
miltokas
Explorer
77 0 20

@namphan thanks for your answer but I believe that this is not the solution I am looking for.

In the example you shared, one is editing html code. In this case, I want to add my text freely and if it is longer than 1 line it should have a Read more link to expand text.

namphan
Shopify Partner
405 47 70

Hi @miltokas,

It will be almost the same, you just need more coding skills to be able to customize it for yourself.

You can hire more experts to change it, it will be faster.

Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com