bsidelinger912 / shiitake

React Line clamp that won't get you fired
MIT License
100 stars 22 forks source link

Text is limited to a block of text #6

Closed SleeplessByte closed 6 years ago

SleeplessByte commented 7 years ago

{text} needs to be a string and linebreaks are not interpreted. Adding html elements breaks shittake.

bsidelinger912 commented 7 years ago

Yes @SleeplessByte, the intention was to trim a solid block of text to a certain number of lines. Can you explain your use case a little more? I'd be happy to think about how to accommodate...

SleeplessByte commented 7 years ago

Having tags in there :)

<p>My text I <strong>want</strong> to ellipsize</p>
bsidelinger912 commented 7 years ago

Ok, I'll play around with that and see what I can come up with.

bsidelinger912 commented 6 years ago

@SleeplessByte, I've been thinking about this and the logistics of what I'd have to do to text trim in and around various html nodes adds too much complexity and size to the library. I think the best route here would be to make a fork of this that is specifically intended for this purpose so that the much more common scenario of just trimming a string isn't slowed down necessarily in Shiitake. I probably wont get to this any time soon as I'm working on a few other packages, but if you want any help doing it, please feel free to reach out. I'm going to close this issue, but we can pick it up in a fork if you choose to make one.