Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!

Workaround: Make any cell contents in Workspace copy-able

Avatar

Level 2

1/30/18

I find it super annoying that text in individual workspace cells is not selectable or copyable. This is especially bad when the cells contain GUIDs or other long things.

To solve this, I made a little Bookmarklet to work around this:

javascript:(function(window,document)%7Bfunction%20copyToClipboard(txt)%7Bvar%20textArea,copy;function%20createTextArea(text)%7BtextArea=document.createElement('textArea');textArea.value=text;document.body.appendChild(textArea)%7D%20function%20copyToClipboard()%7Bdocument.execCommand('copy');document.body.removeChild(textArea)%7D%20createTextArea(txt);textArea.select();copyToClipboard()%7D%20function%20listener(e)%7BcopyToClipboard(e.target.textContent);e.preventDefault();document.body.removeEventListener('click',listener,!0)%7D;document.body.addEventListener('click',listener,!0)%7D)(window,document)

To use this, create a bookmark in your browser's favorite bar and give it the above line of javascript as URL. After clicking on that bookmark, just click on the "unselectable" cell and voilà, the content is now as text in your clipboard.

I hope others find this useful, too. (Oh, and tested only in Safari, Chrome and Firefox on MacOS X).

1 Comment