Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-oncopy.js
| Show All 10 Lines | |||||
| * | * | ||||
| * To improve this behavior, applications can embed markers that delimit | * To improve this behavior, applications can embed markers that delimit | ||||
| * metadata (left of the marker) from content (right of the marker). When | * metadata (left of the marker) from content (right of the marker). When | ||||
| * we get a copy event, we strip out all the metadata and just copy the | * we get a copy event, we strip out all the metadata and just copy the | ||||
| * actual text. | * actual text. | ||||
| */ | */ | ||||
| JX.behavior('phabricator-oncopy', function() { | JX.behavior('phabricator-oncopy', function() { | ||||
| var zws = "\u2060"; // Unicode Word Joiner (Non-Breaking Zero-Width Space) | var zws = "\u200B"; // Unicode Zero-Width Space | ||||
| JX.enableDispatch(document.body, 'copy'); | JX.enableDispatch(document.body, 'copy'); | ||||
| JX.Stratcom.listen( | JX.Stratcom.listen( | ||||
| ['copy'], | ['copy'], | ||||
| null, | null, | ||||
| function(e) { | function(e) { | ||||
| var selection; | var selection; | ||||
| Show All 38 Lines | |||||