Multiline ellipsis for HTML (not text) with GWT

Mac

New Member
I am getting an \[code\]HTML\[/code\] string from from a REST server, it looks something like that: \[code\]"... text with a <span class='myClass'>stylized phrase</span> and then some ..."\[/code\]I need to inject it to a \[code\]GWT HTMLPanel\[/code\] as an \[code\]HTML\[/code\] (i.e \[code\]element.setInnerHtml(str)\[/code\]). The only \[code\]HTML tags\[/code\] in the string are these kind of spans (I don't know how many).
My problem is when doing this in \[code\]GWT\[/code\] I have to account for those \[code\]span HTML tags\[/code\] and it makes it much more complex.I have tried \[code\]CSS\[/code\] ellipsis effect:\[code\].myElement { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}\[/code\]But it works only for one-liners, and I'd like for it to be 2 lines before the ellipsis (in order to fill more of the containing div).The only resort I have now is doing this trick, which seems to me like an overkill.
I would prefer doing this in \[code\]GWT\[/code\], does anyone have an idea on how to do this.
 
Back
Top