Multi-line Text Truncating In Pure JavaScript – Ellipsity

Category: Image | October 4, 2018
Author: Xela101
Views Total: 168 views
Official Page: Go to website
Last Update: October 4, 2018
License: MIT


Multi-line Text Truncating In Pure JavaScript – Ellipsity


Ellipsity is a super tiny JavaScript library that has the ability to truncate the long multi-line text within a container when there’s no enough space.

How to use it:

Link to the main JavaScript ellipsity.min.js and we’re ready to go.

<script src="ellipsity.min.js"></script>

Wrap the long text into the container with a fixed height.

<div id="container">
  <span>This is some text that I am going to ellipsify because the content this container contains is way way to long for the whole thing to be displayed and that is why I am doing this.</span>

Initialize the library on the container. That’s it.




  • v1.0.0

You Might Be Interested In:

Leave a Reply