vue-text-middle-ellipsis

1.0.13 • Public • Published

Vue Text Middle Ellipsis

npm version npm downloads

A Simple vue-directive for the text middle ellipsis.

Install

npm install vue-text-middle-ellipsis --save # or yarn add vue-text-middle-ellipsis 
import Vue from 'vue';
import textMiddleEllipsis from 'vue-text-middle-ellipsis';
 
Vue.use(textMiddleEllipsis);

Usage

<p v-text-middle-ellipsis="4">Some long text.</p>

The value passed to the directive - is the count of symbols from the end of string that you are want to preserve from truncate.

Result

'Some...ext.'

Live example

Is it useful for you?

Please star this repo. Perhaps you have an idea how to improve this solution? Feel free to suggest your PR.

Package Sidebar

Install

npm i vue-text-middle-ellipsis

Weekly Downloads

27

Version

1.0.13

License

MIT

Unpacked Size

8.75 kB

Total Files

4

Last publish

Collaborators

  • tardigrada777