trunk8 icon indicating copy to clipboard operation
trunk8 copied to clipboard

onTruncate callback has no way to reference truncated element

Open gavin310 opened this issue 7 years ago • 0 comments

Thanks for the excellent plugin. In the onTruncate callback, I want to do something with the element that has been truncated (highlight, add styles, javascript, etc.) It looks like the onTruncate callback is called with no reference to the element that was truncated, so it's impossible to know which element was truncated. To fix this I made a very simple change.

Changing line 232 from:

settings.onTruncate();

to:

settings.onTruncate(this);

It seems to me this should be included in the next version. (Sorry, I don't use git so I cannot commit.)

gavin310 avatar Oct 06 '17 08:10 gavin310