Try loading as AMD module or fall back to default loading
The actual plugin class
Default options for the plugin
Initializer function.
Clean up content
Find the parent to use as reference
Attach evenets to the widget
Do the actual truncation
Truncate until the element fits into the reference parent height NOTE: "|| 0" with parseInt is for compatibility with IE8-
Let descenders overflow
Abort truncation if height <= 0 or we won't have any text displayed
Prepare the string append
Truncate a simple text string.
Truncate an HTML text string and preserve HTML tags.
Reset the plugin for re-initialisation
Install the plugin into the JS library
Ellipsis
The
Ellipsis
class provides a plugin that truncates text/HTML.author: Julien Ramboz
version: 1.0
usage: Ellipsis examples