dotdotdot-js icon indicating copy to clipboard operation
dotdotdot-js copied to clipboard

Upgrading from jQuery-dotdotdot v1.8.1 to dotdotdot.js v4.1.0 - changed behaviour?

Open randomnuggets opened this issue 4 years ago • 0 comments

I am working through the impacts of an upgrade to v4.1.0.

In v4.1.0, in the case of a <div> that contains multiple <p> child elements, the behaviour appears to have changed.

Here is an example under the old version https://codepen.io/randomnuggets/pen/XWgOzwy and here is the same thing under the new version https://codepen.io/randomnuggets/pen/bGRzaoL

Notice how, in the old version, the "...More" string appears directly after the text that it truncates. Tidy and compact. Nice.

But in the new version, the "More" string is separate from the ellipsis and placed after the truncated paragraph. I think there is a </p> tag between the ellipsis and the 'More' string.

Is this a deliberate change? Is there a method to achieve the old 'in-line' functionality under v4.1.0?

Thanks!

randomnuggets avatar Oct 02 '21 03:10 randomnuggets