New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a reason copyToSystem doesn't accept multiple mime types? #7119
Comments
We used text only because at least one of our supported browsers only allowed text on clipboard events. It could be that this was IE, which we no longer support, and we could offer other types. |
Thanks, shall I make a PR allowing other mime types and possibly allowing mime types ? This can help in the case of fallbacks (e.g. pasting into notepad uses text, but pasting into outlook can use html). (I do realize I don't actually need this PR for my extension, I can just use the clipboard API myself directly in the extension) |
I took another look at MDN, it looks like as long as we use text for the data itself, we can add whatever mime types we like. https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData |
Yeah, the classic notebook has used a custom mime type for copying and
pasting cells.
…On Wed, 11 Sep 2019, 17:27 Steven Silvester, ***@***.***> wrote:
I took another look at MDN, it looks like as long as we use text for the
data itself, we can add whatever mime types we like.
https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7119?email_source=notifications&email_token=ACEZEDAM2PXCZYUNRV5BMI3QJDMJ3A5CNFSM4ISETRNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OHNKY#issuecomment-530347691>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACEZEDEGYMZPKJGU2FGEDKDQJDMJ3ANCNFSM4ISETRNA>
.
|
Ah, right. I found myself wishing system copy and paste worked for cells just yesterday... |
Wasn't that feature deliberately left out because we can drag/drop cells across notebooks in lab ? |
I think we didn't do it because we have our own clipboard that can have more complex data types and didn't know how to rectify the two clipboards cleanly. |
Closed via #7202 |
I want to copy an image from an output area (in user/extension land) and couldn't use copyToSystem
Can we have an optional
format
param for this method that defaults to text ?The text was updated successfully, but these errors were encountered: