Don't know if anyone would find this useful, but the workaround to not using flash for clipboard access for us was as follows;
In documents.java and Folder.java (you'll need a clipboard icon)
Code: Select allString url = Main.get().workspaceUserProperties.getApplicationURL();
url += "?uuid=" + URL.encodeQueryString(URL.encodeQueryString(document.getUuid()));
tableProperties.setHTML(1, 1, "<img class=\"js-textareacopybtn\" src=\"/OpenKM/img/clipboard.png\" title=\"Copy URL to clipboard\" onclick=\"copyTextToClipboard('" + url + "')\">");
In frontend/index.jsp
Code: Select all<script type="text/javascript" src="../js/clipboard.js"></script>
In js/clipboard.js
Code: Select allfunction copyTextToClipboard(ToCopy) {
var textArea = document.createElement('textarea');
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
textArea.style.background = 'transparent';
textArea.value = ToCopy;
document.body.appendChild(textArea);
textArea.select();
try { var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Copying text command was ' + msg);
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea);
}