Copy URL to clipboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2008 02:46 AM
I am looking for the code of the "Copy URL to clipboard" UI Actions, but I didn't find it in the list of the UI actions.
In fact, I would like to duplicate it and change the code in order to use to copy/paste the content of a knowledge article (to be able to export it to an other software).
Anyone knows how to duplicate this UI action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2008 07:17 AM
The one for a form is not a UI Action, rather it's in the context_form_header UI Macro.
It uses a copyToClipboard(str) function which takes a string parameter as the content to copy to the clipboard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2008 07:25 AM
copyToClipboard(str) does the following on the client:
function copyToClipboard(str) {
if (ie5) {
var textArea = document.createElement("textarea");
textArea.value = str;
var CopiedText = textArea.createTextRange();
CopiedText.execCommand("copy");
} else {
foxCopy_clip(str);
}
}