Skip to content

onTruncate callback has no way to reference truncated element #81

@gavin310

Description

@gavin310

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions