ember-shave
v1.1.0
Published
The default blueprint for ember-cli addons.
Downloads
3
Maintainers
Keywords
Readme
ember-shave
A simple wrapper over DSC's super fast and simple text truncation library called shave.
Installation
ember install ember-shave
Usage
Code:
{{#em-shave ~}}
Lorem ipsum dolor sit amet, minim molestie argumentum est at, pri legere torquatos instructior ex. Vis id odio atomorum oportere, quem modo fabellas sit at, dicat semper est ne. Apeirian detraxit pri eu. No solum accusam has. Ius ne harum mundi clita, eu pro tation audiam.
{{/em-shave}}
Result:
Lorem ipsum dolor sit…
Note: this contrived example assumes a width of 50px
Gotchas
Whitespace control: In Handlebars, Ember's templating language, whitespace control is done by appending a
~
to the opening tag of your componentsUse block-style components: ember-shave assumes you've written your components using the block style. That is, this does not work: {{ em-shave text="Trim me!" }}