I want to limit the number of lines in a pharagraph... and i want to add three dots (...) at the end...
It should look like
Lorem Ipsum is simply dummy text of the printing
and typesetting industry.Lorem Ipsum has been...
not like
Lorem Ipsum is simply dummy text of the printing
and typesetting industry.Lor...
I was ablt to achive this last solution by adding a character count... like below
const getTrimmedText = (source: string) => {
if (source.length > 100) {
return source.substring(0, 100).trimEnd() + '...';
} else {
return source;
}
};
but i want line count... Im using MUI typhography
in react
... so im somewhat limited... does anyone know how to achive this...