Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning final truncated value from main method #60

Open
mario-petrovic opened this issue Nov 30, 2022 · 0 comments
Open

Returning final truncated value from main method #60

mario-petrovic opened this issue Nov 30, 2022 · 0 comments

Comments

@mario-petrovic
Copy link

mario-petrovic commented Nov 30, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant