ember-text-clipper
Advanced tools
Comparing version
@@ -26,3 +26,3 @@ import Component from 'ember-component'; | ||
init() { | ||
didReceiveAttrs() { | ||
this._super(...arguments); | ||
@@ -32,2 +32,6 @@ set(this, 'canCollapse', get(this, 'canCollapse') || get(this, 'canExpand')); | ||
set(this, 'safeText', this._isHTML() ? htmlSafe(get(this, 'text')) : get(this, 'text')); | ||
if (get(this, 'text').length > get(this, 'length')) { | ||
set(this, 'isTruncated', true); | ||
} | ||
}, | ||
@@ -34,0 +38,0 @@ |
{ | ||
"name": "ember-text-clipper", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Ember CLI addon for text-clipper.", | ||
@@ -26,2 +26,3 @@ "directories": { | ||
"ember-cli-dependency-checker": "^1.2.0", | ||
"ember-cli-github-pages": "0.1.2", | ||
"ember-cli-htmlbars": "^1.0.3", | ||
@@ -28,0 +29,0 @@ "ember-cli-htmlbars-inline-precompile": "^0.3.1", |
@@ -5,6 +5,8 @@ # ember-text-clipper | ||
[](https://travis-ci.org/vevix/ember-text-clipper) | ||
[](https://emberobserver.com/addons/ember-text-clipper) | ||
An [Ember CLI](https://ember-cli.com/) addon for [text-clipper](https://github.com/arendjr/text-clipper). | ||
Which is a performant and HTML-safe text clipper. | ||
_Currently using [text-clipper](https://github.com/vevix/text-clipper) fork._ | ||
_Currently using my [text-clipper](https://github.com/vevix/text-clipper) fork._ | ||
@@ -11,0 +13,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
170481
2319.54%12
9.09%88
3.53%82
2.5%21
5%