-
-
Notifications
You must be signed in to change notification settings - Fork 942
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
Integrate SingleFile with "Share API" (Safari and Chromium on Windows) #1381
Comments
I just posted an article for my publication, Apple Dispatch, about integrating SingleFile, Apple Notes and Safari that is relevant to this suggested feature request and also how to harness the power of SingleFile in general. The way that I'm sharing items now is by Right-clicking the downloaded HTML file, selecting Share…, and then choosing Notes. It would be great to have the tighter integration built directly into the Safari Share Sheet. Thanks for your continued efforts on such an amazing tool! |
Thank you very much for the article. I did a quick test in Safari and it looks promising. The good news is that it supports the FYI, here is the test I did:
document.onclick = () => navigator.share({ files: [new File([ document.documentElement.outerHTML ], "example.html")]})
I will do a more advanced integration test in SingleFile, I'll keep you informed ;) |
That is absolutely fantastic! I just ran the code you posted and it works perfectly! Thanks for sharing it. I noticed if I click away from the share sheet, without sharing to Notes, I get these errors in the console: (Unhandled Promise Rejection: InvalidStateError: share() is already in progress) and this one: (Unhandled Promise Rejection: AbortError: Abort due to cancellation of share.) Maybe this is the intended behavior? I put the word out about my article highlighting SingleFile over at the excellent /MacApps subreddit and they are really digging it there. It’s turning on a lot of people (≈ 3.9k currently) to your wonderful extension in the Apple community. Yes indeed, please keep me in the loop as things progress. I will be posting about this @Apple Dispatch for my Apple Notes series once this feature becomes a reality. Truly exciting developments! |
It's implemented. I added a new option The new option will be available in the next version. |
Thanks so much for your excellent work on this new feature! I love to see SingleFile getting even tighter integration with Safari and Notes. Can't wait to see this drop on the App Store. |
The new version (1.2.0) is available for download on the App store. |
This is absolutely killer! Is there a way for this new implementation to also work for Save selection to Notes? |
Actually, it should also work for selection if you use the context menu and select 'Save selection' instead of clicking on SingleFile button. |
That's great! Is there a way for the 'Share page…' button to change to 'Share selection…' when choosing that option from the context menu? |
Thank you for the suggestion, it is fixed. The fix will be available in the next version. |
Any time. Well done! |
Is there a way to get macOS Spotlight to index the HTML files saved by SingleFile? It seems that files saved to Apple Notes can only be searched by title and not by the text contained within each HTML document. |
I don't think it's possible. It looks like it's a "bug" in Notes, see https://discussions.apple.com/thread/251960240?answerId=253757819022. However, you can search for attached pages with the Finder in |
You're definitely on to something with that Apple Discussion thread. I was able to find out that Spotlight will index and search text content within Safari webarchives, but Notes cannot do the same. It looks like Apple did not implement that part of the Spotlight Index API in Notes. So, it seems pretty clear why Notes cannot search SingleFile archives, but I'm still not sure why Spotlight can't search them. Maybe, Apple only allows the API to work on its own HTML archive format? |
The goal would be to include a “Save page to Notes” and “Save selection to Notes” in the list of suggestions.
The text was updated successfully, but these errors were encountered: