react-truncate icon indicating copy to clipboard operation
react-truncate copied to clipboard

Support for text without spaces

Open mirovelk opened this issue 7 years ago • 3 comments

This should enable multiline truncating of non-typical text that does not contain spaces (eg URLs) and hopefully also resolve #82.

New property breakAll added (default: false).

When set to true, truncated text will behave as if css rule word-break: break-all was applied to the parent block.

Result looks like this:

image

mirovelk avatar Feb 14 '18 15:02 mirovelk

Not sure how maintained this library is anymore but this fix would be really awesome!

chason avatar Mar 19 '18 06:03 chason

In case it helps anyone, react-text-truncate supports this feature out of the box.

dopeboy avatar Jun 13 '18 22:06 dopeboy

@mirovelk @chason yes, we still maintain the library, but trying to be very careful on what gets in since it will determine our resource allocation in future.

I would say that if setting word-break: break-all in your css does the job, go for it.

moubi avatar Aug 10 '18 13:08 moubi