Character limit displaying dynamic elements

Hi everyone,
Is there a way to restrict a number of characters while displaying text as a dynamic element?
See the “reviews” - I’d like to have them all the same length: http://maga-supply-02.webflow.io/all-products-reviews

Thanks!

You can set both minimum and maximum character counts when you set up the Collection. I’d recommend doing that rather than trying to limit on the display end so content creators are aware of and write for the limitation, rather than creating awkward truncations.

1 Like

Why, if it should be the other way around, the author does not need to know about this restriction, why is it not so convenient to do this? Why not make a restriction on the conclusion?

@bonidom

Any time code is restricting content length, there are limits to where that can occur. On a punctuation mark, or end of a sentence, after X characters. Then if you did truncate, how would you let the visitor know you truncated the authors copy? What works for one, might not for others.

For these reasons, restrictions on input is the better choice. If this is a layout issue (I want all the boxes with content to be the same height), you can address that with box sizing and flexbox.

Also, there is no restriction on you creating custom code / script, that effected the element(s) in a way that works for you.

Tell me, please, how instead of a troy point, the inscription was displayed (in more detail …), I found how to limit it, but I don’t like troy point! I need to display the inscription

.short {

overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-height: 32px; /* fallback /
max-height: 57px; /
fallback /
-webkit-line-clamp: 2; /
number of lines to show */
-webkit-box-orient: vertical;
}

I am not sure what you mean by this. You mean the ellipsis?

Yes i mean ellipsis (‘…’)

Did you resolve your issue? The MDN docs did have the answer.

No, I have not solved this issue.