angular-ellipsis
angular-ellipsis copied to clipboard
Truncate long words
Hi, thanks for you work! I notice that there is an issue if a word is too long... the plugin doesn't truncate words, for example if my text is:
abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvwxyz123456789Four score
I can see only:
abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvwxyz123456789abcdefghijklmnopqrstuvw
There is an example with demo script:
Any ideas for a solution? Thanks again for the plugin!
Alessandro
I had this same issue. Here is my quick fix
<p data-ng-bind="paragraphText" data-ellipsis data-ellipsis-separator="" style="word-break: break-all;"></p>
Add data-ellipsis-separator="" and set the style of the element word-break: break-all
Note: This is not a perfect fix
+1
Another alternative is to use:
word-wrap: break-word
but ellipsis will not occur and you will have to overflow: hidden. work-break does tend to be agressive in normal situations.