Skip to content

Truncate long words #67

Open
Open

Description

@AlessandroSantamaro

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:
ellipsis-long-word

Any ideas for a solution? Thanks again for the plugin!

Alessandro

Activity

  1. kagant15 commented on Nov 9, 2016

    @kagant15

    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

  2. hspier commented on Feb 24, 2017

    @hspier

    +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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions