Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ellipsis handle hyperlinks #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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