I am trying to limit the lines of text to three lines. If the user types in the text that are more than three lines, I want the text from the 4th line and below to be delete/truncated.
For example if the user types in the following:
<div class="example">
Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Nostrum
dignissimos sint dolores
necessitatibus repellendus in nemo
</div>
It should look like this:
Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Nostrum
dignissimos sint dolores...
https://jsfiddle.net/cliffeee/bjhvpf7q/27/
I am not sure what's the best approach to take to achieve this. I have tried using an ellipsis, but the issue I am running into is that, if there are more than three lines, it is hiding every line except line 1. I want it to hide only from line 4 and thereafter with the ...