-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extend copy to clipborad function to support customized mime types #8912
Extend copy to clipborad function to support customized mime types #8912
Conversation
Confirmed: Leilei332 has already signed the Contributor License Agreement (see contributing.md) |
✅ Deploy Preview for tiddlywiki-previews ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Can you be more specific, how this should be used. I am not sure if it works as expected. See: https://alexharri.com/blog/clipboard |
Using the function in javascript, which copys html with $tw.utils.copyToClipboard("<em>Test</em>", {}, "text/html"); Using the macro:
|
Try this one in the preview. Click the copy to clipboard button and press ctrl+v, the tiddlers should be displayed in the importer:
The dropzone widget turned out to be able to parse the data saved in |
Great thanks @Leilei332, looks good, and very useful. We will need a documentation update as well. |
Great, thanks @Leilei332 |
@Leilei332 -- Which browsers did you test this with? -- I did test it with Edge Windows and it seems it only handles the text/plain buffer. |
That's strange. I tested it on firefox 128, chrome 132 and edge 132 on Windows 10, they all worked well. |
Did you test with https://tiddlywiki.com/prerelease or from localhost? ... I did test with localhost ... May be there is a difference. More testing will be needed. |
Related to #7208 and #8613. An attempt to extend tw's copy to clipboard function to support setting the mime type of the copied text. Macros and widget messages are also updated.