Skip to content

To know about click event on image in custom formatter #863

Answered by ghiscoding
vysakhtk886 asked this question in Q&A
Discussion options

You must be logged in to vote

because that's not the way to do it, you should always avoid adding any JS code in a Formatter because that is an open door to scripting attack (XSS). Funny enough you're not the only one thinking this way recently and it all came up recently because I closed that door in a recent SlickGrid PR #652 that will sanitize (remove) any JS code from a Formatter and other areas of SlickGrid and a few people got surprised as well.

The correct way to do it in SlickGrid is by using any of the SlickGrid events that it exposes publicly, but an even easier way in Angular-Slickgrid is to use the column definition property onCellClicked that I added to the Column interface (it's a simple wrapper of the S…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ghiscoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants