I want to be able to copy content to the system clipboard, not to the web clipboard, so I suppose dcc.Clipboard is out of the question. I found a solution using pyperclip, but my requirement is to have a copy button inside each row of the table (I am using Dash AG Grid), so I suppose that won’t work either and I would need a cellRenderer function defined in dashAgGridComponentFunctions.js. What kind of component should it create - can it create a regular html.Button which calls document.execCommand(“copy”) when clicked?
I believe that these clipboard components arent just confined to the browser, they should work across the entire system:
It says “browser’s clipboard” at the very top of the docs: “The
dcc.Clipboard component copies text to the browser’s clipboard when the user selects the copy icon.”
But you can paste into other documents that are not the browser.
Did you test it?
Yes, it works outside the browser as well. I must have been doing something incorrectly the first time I tried it. Thanks.