Skip to content

Returning final truncated value from main method #60

@mario-petrovic

Description

@mario-petrovic

Hello

Just discovered your lib for ellipse text and it is such a well designed solution. Great work, it helped me very much.

I was curious if you considered returning a value that was a final result that you set inside the element that you are targeting.
This can be useful if you want to take that truncated text and use it elsewhere.

Additionally, i know that this lib is for the truncation of a text in an element, but it could be useful to add a method or extend the existing ellipsis function with a option to prevent modification of the targeted element in case you want to use only the result of the truncation (this goes in conjunction with the above mentioned returning of truncated value).

EDIT:
To add to the last part, motivation for preventing the element modification was that i was trying out your lib in a React app and you should not modify elements inside DOM, rather as a value that you want to insert via VDOM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions