I’m developing a Next.js application where users can take notes on pictures, and I’m looking for a way to allow users to export these notes (structured as image + text pairs) directly to Apple Notes. So far, I’ve tried several approaches, but none seem ideal. I’m hoping someone can suggest better solutions or improvements.
Question:
Has anyone encountered a similar situation or found a better way to export structured data (like image + text) to Apple Notes from a web app? Are there any workarounds or other APIs that might support this kind of integration?
Any guidance or suggestions would be greatly appreciated!
Here are the options I’ve tried so far:
Copy and Paste:
I copy the information (text + image) to the user’s clipboard. They can manually paste this into Apple Notes.
Issue: This solution is not very user-friendly and requires manual intervention.
URL Scheme (Only works for text):
iPhone: mobilenotes://add?title=My%20Note%20Title&content=This%20is%20the%20body%20of%20the%20note%20on%20iOS
Mac: notes://add?title=My%20Mac%20Note%20Title&content=This%20is%20the%20body%20of%20the%20note%20on%20macOS
Issue: This only allows text export; images cannot be included using this approach.
Using the Share API:
This allows the user to select Apple Notes as the app where the content will be saved. It works well but has limitations.
Issue: The Share API can only handle a structure like: one title, one text block and then the images in a combination (but not text – image, text – image blocks … etc.
3
Answers
Using Navigator: clipboard
It is possible to save html to the clipboard.
Small Code Example
I think you can generate your note using markdown format (notion, apple notes etc support it) and then you can use the share api to open the file using notes
On macOS, you could create RTFD bundles.
Rich Text Format Directory (RTFD) bundles, such as those created by TextEdit rich text documents with images, can be imported into Apple Notes on macOS with formatting and images preserved. The bundle is essentially a directory with a standard Rich Text Format (
.rtf
) file, along with attachments (such as images).If you can package and allow downloading content from your application as RTFD bundles, they can be easily imported by the user, by just opening them in Apple Notes. I would suggest creating a rich text document in TextEdit (on macOS) and adding images, then opening the resulting RTFD bundle in Apple Notes. If this solution works for you, you can inspect the underlying file structure of the bundle to see how you can make an export of your application data that matches the RTFD bundle structure.