textcliper
Multiple lines of text ellipsis
Getting Started
HTML:
Test Something ! labellabel2
CSS:
JavaScript:
var app = document TextCliperclipapp 1
Result:
Test Something ! l...
Installing
Using NPM:
npm install textcliper --save
Using CDN:
API
// using cdn var app = document TextCliperclipapp 1 // or using npm TextCliperclipapp 1 // or vue plugin, if you use Vue Vue // vue instance method this // vue directive <div v-textclip="1"> Test Something ! <span>label</span><span>label2</span> </div>
TextCliper
a TextCliper
instance
TextCliper.clip(ele, options [, lines])
ele
: target dom element.
options
: when it is a number, it indicates the number of rows ellipsis.
options.lines
: specifies the number of rows to ellipsis.
options.sign
: ellipsis symbol, the default is ...
.
License
This project is licensed under the MIT License - see the LICENSE file for details