{"action":"opened","issue":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/2060","labels_url":"https://api.github.com/repos/handsontable/handsontable/issues/2060/labels{/name}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/2060/comments","events_url":"https://api.github.com/repos/handsontable/handsontable/issues/2060/events","html_url":"https://github.com/handsontable/handsontable/issues/2060","id":54334827,"number":2060,"title":"Custom Copy Cells","user":{"login":"cgatesman","id":6276072,"avatar_url":"https://avatars.githubusercontent.com/u/6276072?v=3","gravatar_id":"","url":"https://api.github.com/users/cgatesman","html_url":"https://github.com/cgatesman","followers_url":"https://api.github.com/users/cgatesman/followers","following_url":"https://api.github.com/users/cgatesman/following{/other_user}","gists_url":"https://api.github.com/users/cgatesman/gists{/gist_id}","starred_url":"https://api.github.com/users/cgatesman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgatesman/subscriptions","organizations_url":"https://api.github.com/users/cgatesman/orgs","repos_url":"https://api.github.com/users/cgatesman/repos","events_url":"https://api.github.com/users/cgatesman/events{/privacy}","received_events_url":"https://api.github.com/users/cgatesman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-14T15:29:10Z","updated_at":"2015-01-14T15:29:10Z","closed_at":null,"body":"This is an enhancement request...\r\n\r\nI had a need for a copy to capture alternative data than what is really in a cell.  For example, copying what is seen by the rendered cell rather than the actual data it is representing.\r\n\r\nTo to this, I made it so the `copyable` property (which is normally a boolean) optionally be a function which returns the text to be copied to the clipboard.\r\n\r\nThe `getCopyable` function is rewritten as so:\r\n\r\n```java\r\nHandsontable.DataMap.prototype.getCopyable = function (row, prop) {\r\n    var copyable = copyableLookup.call(this.instance, row, this.propToCol(prop));\r\n    if(typeof(copyable) === 'function') {\r\n      return copyable(this.instance, row);\r\n    } else if(copyable) {\r\n      return this.get(row, prop);\r\n    }\r\n    return '';\r\n  };\r\n```\r\n\r\nAdditionally, if there is a need to handle pasting of a different representation, like this, it is handled specifically by the `paste` source in the `afterChange` event."}}