Truncate long text in rich text block

Truncate long text in rich text block

miltokas
Explorer
106 0 32

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
2273 296 337

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
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com
miltokas
Explorer
106 0 32

@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
2273 296 337

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
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com