Skip to content

Conversation

appukuttan-shailesh
Copy link

I found that there were issues (in my case no content visible within cell) when using the ellipsis renderer for cells with long text and also having hyperlinks: e.g.
<td><a href="www.google.com">Link to GOOGLE</a></td>

I figured out that this was because the ellipsis was being applied to <a href="www.google.com">Link to GOOGLE</a> and not Link to GOOGLE, as is required. I therefore updated the script to handle the same, i.e. to extract the outer tag, have the shortening on its contents, and then reapply the previously extracted outer tag. The implementation provided here works for me.

(I am a noob with JS, so the implementation might not be great.)

@DataTables
Copy link
Collaborator

Thank you! I think I'd probably prefer to use regex for this rather than writing it into the DOM and reading it back. That is technically more correct, but it's also slower. I'll look into this for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants